mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
test/test_protocol: add actual crossover case.
Not just add-htlc crossing over, but all the commit stages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e46a2ed49a
commit
a2ced6c16c
4 changed files with 49 additions and 0 deletions
27
test/commits/11-commits-crossover.script
Normal file
27
test/commits/11-commits-crossover.script
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Commits which cross over still get resolved.
|
||||||
|
A:offer 1
|
||||||
|
B:offer 2
|
||||||
|
A:commit
|
||||||
|
B:commit
|
||||||
|
|
||||||
|
A:recvoffer
|
||||||
|
B:recvoffer
|
||||||
|
A:recvcommit
|
||||||
|
B:recvcommit
|
||||||
|
|
||||||
|
A:recvrevoke
|
||||||
|
B:recvrevoke
|
||||||
|
|
||||||
|
# They've got to come into sync eventually!
|
||||||
|
A:commit
|
||||||
|
B:commit
|
||||||
|
A:recvcommit
|
||||||
|
B:recvcommit
|
||||||
|
A:recvrevoke
|
||||||
|
B:recvrevoke
|
||||||
|
|
||||||
|
checksync
|
||||||
|
echo ***A***
|
||||||
|
A:dump
|
||||||
|
echo ***B***
|
||||||
|
B:dump
|
22
test/commits/11-commits-crossover.script.expected
Normal file
22
test/commits/11-commits-crossover.script.expected
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
***A***
|
||||||
|
LOCAL COMMITS:
|
||||||
|
Commit 2:
|
||||||
|
Offered htlcs: 1
|
||||||
|
Received htlcs: 2
|
||||||
|
SIGNED
|
||||||
|
REMOTE COMMITS:
|
||||||
|
Commit 2:
|
||||||
|
Offered htlcs: 2
|
||||||
|
Received htlcs: 1
|
||||||
|
SIGNED
|
||||||
|
***B***
|
||||||
|
LOCAL COMMITS:
|
||||||
|
Commit 2:
|
||||||
|
Offered htlcs: 2
|
||||||
|
Received htlcs: 1
|
||||||
|
SIGNED
|
||||||
|
REMOTE COMMITS:
|
||||||
|
Commit 2:
|
||||||
|
Offered htlcs: 1
|
||||||
|
Received htlcs: 2
|
||||||
|
SIGNED
|
Loading…
Add table
Reference in a new issue