btcd icon indicating copy to clipboard operation
btcd copied to clipboard

btcclient+btcjson: defaultMaxFeeRate to BTC/kvB

Open YusukeShimizu opened this issue 1 year ago • 1 comments

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.

  • https://bitcoincore.org/en/doc/26.0.0/rpc/rawtransactions/sendrawtransaction/

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

  • https://github.com/bitcoin/bitcoin/pull/29434

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

YusukeShimizu avatar Mar 21 '24 04:03 YusukeShimizu

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

  • 3 of 6 (50.0%) changed or added relevant lines in 2 files are covered.
  • 851 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.003%) to 56.883%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rpcclient/rawtransactions.go 0 3 0.0%
<!-- Total: 3 6
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

coveralls avatar Mar 25 '24 07:03 coveralls

I have squashed it.

YusukeShimizu avatar Mar 27 '24 09:03 YusukeShimizu