sync/sync.fsm
branchsync
changeset 2902 5692b0768f9e
parent 2876 6ad08f60ae1b
child 2907 92f22b19b09e
     1.1 --- a/sync/sync.fsm	Wed Aug 29 20:38:40 2018 +0200
     1.2 +++ b/sync/sync.fsm	Wed Aug 29 21:40:59 2018 +0200
     1.3 @@ -33,10 +33,14 @@
     1.4                  send Beacon;
     1.5  
     1.6              on Beacon {
     1.7 -                do storeChallenge; // partner's challenge
     1.8 -                do openTransaction;
     1.9 -                do storeTransaction;
    1.10 -                send HandshakeRequest;
    1.11 +                if weAreSecond {
    1.12 +                    do storeChallenge; // partner's challenge
    1.13 +                    do openTransaction;
    1.14 +                    do storeTransaction;
    1.15 +                    send HandshakeRequest;
    1.16 +                }
    1.17 +                if weAreFirst
    1.18 +                    send Beacon;
    1.19              }
    1.20  
    1.21              on HandshakeRequest {