Skip to content

Commit

Permalink
qa: drop specific value assertions in coin selection test
Browse files Browse the repository at this point in the history
They don't add much value and cause flakiness because the size might sometimes be lower than that due to low-R signature grinding.
  • Loading branch information
darosior committed Mar 13, 2024
1 parent 110e8f2 commit 7086124
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/test_spend.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ def additional_fees(anc_vsize, anc_fee, target_feerate):
)
anc_vsize = bitcoind.rpc.getmempoolentry(spend_txid_1)["ancestorsize"]
anc_fees = int(bitcoind.rpc.getmempoolentry(spend_txid_1)["fees"]["ancestor"] * COIN)
if not USE_TAPROOT:
assert anc_vsize == 161 and anc_fees == 339
additional_fee = additional_fees(anc_vsize, anc_fees, feerate)
assert len(spend_res_2["warnings"]) == 1
assert (
Expand All @@ -355,8 +353,6 @@ def additional_fees(anc_vsize, anc_fee, target_feerate):
)
anc_vsize = bitcoind.rpc.getmempoolentry(spend_txid_1)["ancestorsize"]
anc_fees = int(bitcoind.rpc.getmempoolentry(spend_txid_1)["fees"]["ancestor"] * COIN)
if not USE_TAPROOT:
assert anc_vsize == 161 and anc_fees == 339
additional_fee = additional_fees(anc_vsize, anc_fees, feerate)
assert len(spend_res_2["warnings"]) == 1
assert (
Expand Down Expand Up @@ -403,9 +399,6 @@ def additional_fees(anc_vsize, anc_fee, target_feerate):
anc_fees = int(bitcoind.rpc.getmempoolentry(deposit_2)["fees"]["ancestor"] * COIN)
prev_anc_vsize = bitcoind.rpc.getmempoolentry(spend_txid_1)["ancestorsize"]
prev_anc_fees = int(bitcoind.rpc.getmempoolentry(spend_txid_1)["fees"]["ancestor"] * COIN)
if not USE_TAPROOT:
assert anc_vsize == anc_fees == 165
assert prev_anc_vsize == 161 and prev_anc_fees == 339
additional_fee = additional_fees(anc_vsize, anc_fees, feerate) + additional_fees(prev_anc_vsize, prev_anc_fees, feerate)
assert len(spend_res_3["warnings"]) == 1
assert (
Expand Down

0 comments on commit 7086124

Please sign in to comment.