Skip to content

Commit fa0921e

Browse files
committed
tests: regtest: add comments to swapserver tests
1 parent aeba531 commit fa0921e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/regtest/regtest.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ fi
249249

250250

251251
if [[ $1 == "swapserver_forceclose" ]]; then
252+
# Alice starts reverse-swap with Bob.
253+
# Alice sends hold-HTLCs via LN, Bob funds locking script onchain.
254+
# Bob force-closes the channel, before swap-funding-tx gets mined.
255+
# After swap-funding-tx gets mined, Alice broadcasts onchain claim tx, revealing preimage.
256+
# Bob finds preimage onchain, and creates HTLC-success tx to spend own ctx htlc output onchain.
252257
wait_for_balance alice 1
253258
echo "alice opens channel"
254259
bob_node=$($bob nodeid)
@@ -278,6 +283,11 @@ fi
278283

279284

280285
if [[ $1 == "swapserver_refund" ]]; then
286+
# Alice starts reverse-swap with Bob.
287+
# Alice sends hold-HTLCs via LN, Bob funds locking script onchain.
288+
# Alice never broadcasts onchain claim tx. Bob will use timeout path onchain.
289+
# Then Bob fails hold-HTLCs via LN.
290+
# Channel stays open.
281291
$alice setconfig test_swapserver_refund true
282292
wait_for_balance alice 1
283293
echo "alice opens channel"

0 commit comments

Comments
 (0)