btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.2k stars 2.36k forks source link

btcclient+btcjson: defaultMaxFeeRate to BTC/kvB #2142

Closed YusukeShimizu closed 6 months ago

YusukeShimizu commented 6 months ago

defaultMaxFeeRate was set to 1e8 / 10(sat/kb) as a parameter.
But BTC/kvB is the expected value, so the units was wrong.
This updates defaultMaxFeeRate to BTC/kvB and sets it to 0.1, which is the default value of Bitcoin Core.

Because maxFeeRate sanity check has been added in bitcoin core v27.0 or later, sendrawtransaction cannot be executed without this change.

Fixes https://github.com/lightningnetwork/lnd/issues/8571

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 8369564008

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
rpcclient/rawtransactions.go 0 3 0.0%
<!-- Total: 3 6 50.0% -->
Files with Coverage Reduction New Missed Lines %
mempool/mempool.go 1 66.84%
btcjson/chainsvrcmds.go 10 97.57%
wire/msgtx.go 22 95.66%
mining/mining.go 64 8.58%
rpcserver.go 754 4.15%
<!-- Total: 851 -->
Totals Coverage Status
Change from base Build 8441510314: -0.003%
Covered Lines: 29430
Relevant Lines: 51738

💛 - Coveralls
YusukeShimizu commented 6 months ago

I have squashed it.