Browse Source

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>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
a2ced6c16c
  1. 0
      test/commits/10-offers-crossover.script
  2. 0
      test/commits/10-offers-crossover.script.expected
  3. 27
      test/commits/11-commits-crossover.script
  4. 22
      test/commits/11-commits-crossover.script.expected

0
test/commits/10-commits-crossover.script → test/commits/10-offers-crossover.script

0
test/commits/10-commits-crossover.script.expected → test/commits/10-offers-crossover.script.expected

27
test/commits/11-commits-crossover.script

@ -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

@ -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…
Cancel
Save