Skip to content

Commit

Permalink
bolt7: delay considering a channel edge deleted for 12-blocks
Browse files Browse the repository at this point in the history
Changelog-Added: gossip: delay considering a channel edge deleted for
12-blocks propose by lightning/bolts#1004

Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Sep 20, 2022
1 parent 32df9ee commit c911a65
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/test_bolt7-01-channel_announcement-success.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import time


def test_gossip(runner: Runner) -> None:
def test_gossip_forget_channel_after_12_blocks(runner: Runner) -> None:
# Make up a channel between nodes 02 and 03, using bitcoin privkeys 10 and 20
funding, funding_tx = Funding.from_utxo(
*utxo(0),
Expand Down Expand Up @@ -68,13 +68,9 @@ def test_gossip(runner: Runner) -> None:
),
Disconnect(),
# BOLT #7:
# A node:
# - SHOULD monitor the funding transactions in the blockchain, to
# identify channels that are being closed.
# - if the funding output of a channel is being spent:
# - SHOULD be removed from the local network view AND be
# considered closed.
Block(blockheight=109, txs=[funding.close_tx(200, "99")]),
# - once its funding output has been spent OR reorganized out:
# - SHOULD forget a channel after a 12-block delay.
Block(blockheight=109, number=13, txs=[funding.close_tx(200, "99")]),
Connect(connprivkey="05"),
ExpectMsg("init"),
Msg("init", globalfeatures="", features="08"),
Expand Down

0 comments on commit c911a65

Please sign in to comment.