Skip to content

Commit ccebaed

Browse files
committed
pytest: test_fundpsbt_feerates: don't expect correct weight if we have a short signature.
``` > assert txinfo['weight'] == prep['estimated_final_weight'] E assert 755 == 756 ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent b3dda01 commit ccebaed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_wallet.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ def test_txprepare_feerate(node_factory, bitcoind, chainparams):
537537
@pytest.mark.parametrize("addrtype", ["bech32", "p2tr"])
538538
@unittest.skipIf(TEST_NETWORK != 'regtest', "FIXME: Elements fees are not quite right")
539539
def test_fundpsbt_feerates(node_factory, bitcoind, chainparams, addrtype):
540-
l1 = node_factory.get_node()
540+
l1 = node_factory.get_node(options={'dev-warn-on-overgrind': None},
541+
broken_log='overgrind: short signature length')
541542

542543
# Add some funds to withdraw later
543544
for i in range(20):
@@ -581,7 +582,10 @@ def test_fundpsbt_feerates(node_factory, bitcoind, chainparams, addrtype):
581582
signed = l1.rpc.signpsbt(prep['psbt'])['signed_psbt']
582583
sent = l1.rpc.sendpsbt(signed)
583584
txinfo = bitcoind.rpc.getmempoolentry(sent['txid'])
584-
assert txinfo['weight'] == prep['estimated_final_weight']
585+
if did_short_sig(l1):
586+
assert txinfo['weight'] <= prep['estimated_final_weight']
587+
else:
588+
assert txinfo['weight'] == prep['estimated_final_weight']
585589
# We never actually added that `amount` output to PSBT, so that appears as "fee"
586590
fee = int(txinfo['fees']['base'] * 100_000_000) - amount
587591
actual_feerate = fee / (txinfo['weight'] / 1000)

0 commit comments

Comments
 (0)