Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bolt7: delay considering a channel edge deleted for 12-blocks #61

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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