mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
tx,bugfix: correct signature length estimate
71-bytes for a signature already includes the sighash byte. 2-bytes 30 44 (DER- prefix thing) 34-bytes 02 20 6e29c8df67fffdda1613cef1413eb1a9ef3627f1fc5e4d910837274eafcc7b2a (r) 34-bytes 02 20 4b8563d79b92fdd830a546862439f80b24132d09318af2c7220c791067067e29 (s) 1-byte 01 (sighash) == 71-bytes
This commit is contained in:
@@ -578,7 +578,7 @@ def test_utxopsbt(node_factory, bitcoind, chainparams):
|
||||
assert psbt2['tx']['vin'] == psbt['tx']['vin']
|
||||
if chainparams['elements']:
|
||||
# elements includes the fee as an output
|
||||
addl_fee = Millisatoshi(fee_val * start_weight // 1000 * 1000)
|
||||
addl_fee = Millisatoshi((fee_val * start_weight + 999) // 1000 * 1000)
|
||||
assert psbt2['tx']['vout'][0]['value'] == psbt['tx']['vout'][0]['value'] + addl_fee.to_btc()
|
||||
else:
|
||||
assert psbt2['tx']['vout'] == psbt['tx']['vout']
|
||||
|
||||
Reference in New Issue
Block a user