Skip to content

Commit

Permalink
Merge pull request #92 from Psycho-Pirate/use_stash
Browse files Browse the repository at this point in the history
fix: grab values from accept_channel message using stash
  • Loading branch information
vincenzopalazzo authored Jun 16, 2023
2 parents cd3c189 + d26b75a commit 27ff761
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lnprototest/utils/ln_spec_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def open_and_announce_channel_helper(
commitsig_to_send,
funding_txid,
funding_tx,
stash_field_from_event,
)

# Make up a channel between nodes 02 and 03, using bitcoin privkeys 10 and 20
Expand Down Expand Up @@ -157,7 +158,7 @@ def open_and_announce_channel_helper(
delayed_payment_basepoint=remote_delayed_payment_basepoint(),
htlc_basepoint=remote_htlc_basepoint(),
first_per_commitment_point=remote_per_commitment_point(0),
minimum_depth=3,
minimum_depth=stash_field_from_event("accept_channel", dummy_val=3),
channel_reserve_satoshis=9998,
),
# Create and stash Funding object and FundingTx
Expand Down Expand Up @@ -193,7 +194,13 @@ def open_and_announce_channel_helper(
"funding_signed", channel_id=channel_id(), signature=commitsig_to_recv()
),
# Mine it and get it deep enough to confirm channel.
Block(blockheight=103, number=3, txs=[funding_tx()]),
Block(
blockheight=103,
number=stash_field_from_event(
"accept_channel", field_name="minimum_depth", dummy_val=3
),
txs=[funding_tx()],
),
ExpectMsg(
"channel_ready",
channel_id=channel_id(),
Expand Down

0 comments on commit 27ff761

Please sign in to comment.