mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
state: INPUT_CONNECTION_LOST
We used to have a hacky close timeout which would immediately fire when we'd closed because the connection was down. Far better to have a specific "connection lost" input, and have it respond like CMD_CLOSE. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -192,7 +192,7 @@ if [ -n "$TIMEOUT_ANCHOR" ]; then
|
||||
sleep 2
|
||||
|
||||
# It should send out commit tx.
|
||||
lcli1 getpeers | $FGREP -w STATE_CLOSE_WAIT_CLOSE_OURCOMMIT
|
||||
lcli1 getpeers | $FGREP -w STATE_CLOSE_WAIT_OURCOMMIT
|
||||
|
||||
# Generate a block (should include commit tx)
|
||||
check_tx_spend
|
||||
@@ -212,7 +212,7 @@ if [ -n "$TIMEOUT_ANCHOR" ]; then
|
||||
lcli1 dev-mocktime $TIME
|
||||
sleep 2
|
||||
|
||||
lcli1 getpeers | $FGREP -w STATE_CLOSE_WAIT_CLOSE_SPENDOURS
|
||||
lcli1 getpeers | $FGREP -w STATE_CLOSE_WAIT_SPENDOURS
|
||||
|
||||
# Now it should have spent the commit tx.
|
||||
check_tx_spend
|
||||
|
||||
Reference in New Issue
Block a user