Skip to content

Commit

Permalink
Convert fee result into msats
Browse files Browse the repository at this point in the history
  • Loading branch information
evansmj authored and cdecker committed Feb 2, 2024
1 parent c90ca10 commit 5544911
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/test_bookkeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ def test_bookkeeping_inspect_multifundchannel(node_factory, bitcoind):
channel_13_multifundchannel_fee_msat = l1.rpc.bkpr_inspect(channel_13_channel_id)['txs'][0]['fees_paid_msat']
channel_14_multifundchannel_fee_msat = l1.rpc.bkpr_inspect(channel_14_channel_id)['txs'][0]['fees_paid_msat']

bkpr_total_fee_btc = (channel_12_multifundchannel_fee_msat
+ channel_13_multifundchannel_fee_msat
+ channel_14_multifundchannel_fee_msat).to_btc()
bkpr_total_fee_msat = (channel_12_multifundchannel_fee_msat
+ channel_13_multifundchannel_fee_msat
+ channel_14_multifundchannel_fee_msat)

assert bkpr_total_fee_btc == getblock_fee_btc
assert bkpr_total_fee_msat == int(getblock_fee_btc * 100000000000)


@unittest.skipIf(TEST_NETWORK != 'regtest', "network fees hardcoded")
Expand Down Expand Up @@ -602,14 +602,14 @@ def test_bookkeeping_inspect_mfc_dual_funded(node_factory, bitcoind):
channel_14_multifundchannel_fee_msat = l1.rpc.bkpr_inspect(channel_14_channel_id)['txs'][0]['fees_paid_msat']
channel_41_multifundchannel_fee_msat = l4.rpc.bkpr_inspect(channel_14_channel_id)['txs'][0]['fees_paid_msat']

bkpr_total_fee_btc = (channel_12_multifundchannel_fee_msat
+ channel_21_multifundchannel_fee_msat
+ channel_13_multifundchannel_fee_msat
+ channel_31_multifundchannel_fee_msat
+ channel_14_multifundchannel_fee_msat
+ channel_41_multifundchannel_fee_msat).to_btc()
bkpr_total_fee_msat = (channel_12_multifundchannel_fee_msat
+ channel_21_multifundchannel_fee_msat
+ channel_13_multifundchannel_fee_msat
+ channel_31_multifundchannel_fee_msat
+ channel_14_multifundchannel_fee_msat
+ channel_41_multifundchannel_fee_msat)

assert bkpr_total_fee_btc == getblock_fee_btc
assert bkpr_total_fee_msat == int(getblock_fee_btc * 100000000000)


@unittest.skipIf(os.getenv('TEST_DB_PROVIDER', 'sqlite3') != 'sqlite3', "turns off bookkeeper at start")
Expand Down

0 comments on commit 5544911

Please sign in to comment.