decred / dcrdex

The Decred Decentralized Exchange (DEX), powered by atomic-swaps.
Other
184 stars 91 forks source link

client/asset/btc: do not use settxfee RPC anymore #1706

Closed chappjc closed 2 years ago

chappjc commented 2 years ago

https://github.com/decred/dcrdex/blob/b7f667d97c3f59e6d5e4a0ad42fa7911a06fb87d/client/asset/btc/rpcclient.go#L671-L684

This is racy, as we knew when initially coding this. However, recent versions of Bitcoin Core (and other coin's clones) support a fee_rate argument for sendtoaddress that we should use instead.

10. fee_rate (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in sat/vB.

I'm not certain if we can use our current rpcclient easily though because it does not support named args (json object instead of positional args). We can try to just give all the defaults or empty args for the ones we don't want to set.

The settxfee approach may still be required for ancient forks like DOGE however.

vctt94 commented 2 years ago

I can work on this

chappjc commented 2 years ago

Thanks. All yours