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:
Rusty Russell 2016-05-18 06:55:28 +09:30
parent e46a2ed49a
commit a2ced6c16c
4 changed files with 49 additions and 0 deletions

View 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

View 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