mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
onchaind: use lowball fee instead of donating to miners.
As of bitcoind 0.16.1, you can't send a single-input OP_RETURN output, as you get 'tx-too-small'. sendrawtx exit 26, gave error code: -26?error message:?tx-size-small (code 64)?' So instead we use the minimum fee we can, but otherwise ignore it and don't wait for it to be mined. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
0e6c0dbba2
commit
c78afa9201
@@ -2206,26 +2206,22 @@ class LightningDTests(BaseLightningDTests):
|
||||
l2.daemon.wait_for_log(' to ONCHAIN')
|
||||
|
||||
# Wait for timeout.
|
||||
l1.daemon.wait_for_log('Propose handling THEIR_UNILATERAL/OUR_HTLC by DONATING_TO_MINERS .* after 6 blocks')
|
||||
bitcoind.generate_block(6)
|
||||
l1.daemon.wait_for_log('Propose handling THEIR_UNILATERAL/OUR_HTLC by IGNORING_TINY_PAYMENT .* after 6 blocks')
|
||||
bitcoind.generate_block(5)
|
||||
|
||||
l1.daemon.wait_for_log('sendrawtx exit 0')
|
||||
bitcoind.generate_block(1)
|
||||
|
||||
l1.daemon.wait_for_log('Resolved THEIR_UNILATERAL/OUR_HTLC by our proposal DONATING_TO_MINERS')
|
||||
l1.daemon.wait_for_logs(['Broadcasting IGNORING_TINY_PAYMENT .* to resolve THEIR_UNILATERAL/OUR_HTLC',
|
||||
'sendrawtx exit 0',
|
||||
'Ignoring output 0 of .*: THEIR_UNILATERAL/OUR_HTLC'])
|
||||
|
||||
# 100 deep and l2 forgets.
|
||||
bitcoind.generate_block(91)
|
||||
sync_blockheight([l2])
|
||||
bitcoind.generate_block(93)
|
||||
sync_blockheight([l1, l2])
|
||||
assert not l2.daemon.is_in_log('onchaind complete, forgetting peer')
|
||||
assert not l1.daemon.is_in_log('onchaind complete, forgetting peer')
|
||||
bitcoind.generate_block(1)
|
||||
l2.daemon.wait_for_log('onchaind complete, forgetting peer')
|
||||
|
||||
# l1 forgets 100 blocks after DONATING_TO_MINERS.
|
||||
bitcoind.generate_block(6)
|
||||
sync_blockheight([l1])
|
||||
assert not l1.daemon.is_in_log('onchaind complete, forgetting peer')
|
||||
bitcoind.generate_block(1)
|
||||
# l1 does not wait for ignored payment.
|
||||
l1.daemon.wait_for_log('onchaind complete, forgetting peer')
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1 for dev_fail")
|
||||
|
||||
Reference in New Issue
Block a user