From 8185e5f2478864d906ca03ae7e492c15377065c1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 May 2016 21:58:45 -0500 Subject: [PATCH] test --- iguana/swaps/iguana_BTCswap.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/iguana/swaps/iguana_BTCswap.c b/iguana/swaps/iguana_BTCswap.c index 3cd619f8d..fe487b7de 100755 --- a/iguana/swaps/iguana_BTCswap.c +++ b/iguana/swaps/iguana_BTCswap.c @@ -955,33 +955,38 @@ struct instantdex_stateinfo *BTC_initFSM(int32_t *n) // [BLOCKING: feefound] Bob waits for fee and sends deposit when it appears, alice skips past instantdex_addevent(s,*n,"BTC_waitfee","gendep","poll","BTC_gendeposit"); // bob's virt instantdex_addevent(s,*n,"BTC_waitfee","waitdep","poll","BTC_waitdeposit"); // alice's virt - instantdex_addevent(s,*n,"BTC_waitfee","poll","poll","BTC_waitfee"); + instantdex_addevent(s,*n,"BTC_waitfee","sentprivs","poll","BTC_waitfee"); + instantdex_addevent(s,*n,"BTC_waitfee","poll","sentprivs","BTC_waitfee"); instantdex_addevent(s,*n,"BTC_gendeposit","depmade","poll","BTC_waitaltpayment"); - instantdex_addevent(s,*n,"BTC_gendeposit","poll","poll","BTC_gendeposit"); + instantdex_addevent(s,*n,"BTC_gendeposit","sentprivs","poll","BTC_gendeposit"); + instantdex_addevent(s,*n,"BTC_gendeposit","poll","sentprivs","BTC_gendeposit"); // [BLOCKING: depfound] Alice waits for deposit to confirm and sends altpayment, bob skips instantdex_addevent(s,*n,"BTC_waitdeposit","depfound","gotdep","BTC_waitpayment"); // alice virt instantdex_addevent(s,*n,"BTC_waitdeposit","gotdep","poll","BTC_waitdeposit"); - instantdex_addevent(s,*n,"BTC_waitdeposit","poll","poll","BTC_waitdeposit"); + instantdex_addevent(s,*n,"BTC_waitdeposit","sentprivs","poll","BTC_waitdeposit"); + instantdex_addevent(s,*n,"BTC_waitdeposit","poll","sentprivs","BTC_waitdeposit"); // [BLOCKING: altfound] now Bob's turn to make sure altpayment is confirmed and send payment instantdex_addevent(s,*n,"BTC_waitaltpayment","altfound","gotalt","BTC_waitpayment"); // virt instantdex_addevent(s,*n,"BTC_waitaltpayment","gotalt","poll","BTC_waitaltpayment"); - instantdex_addevent(s,*n,"BTC_waitaltpayment","poll","poll","BTC_waitaltpayment"); + instantdex_addevent(s,*n,"BTC_waitaltpayment","sentprivs","poll","BTC_waitaltpayment"); + instantdex_addevent(s,*n,"BTC_waitaltpayment","poll","sentprivs","BTC_waitaltpayment"); // [BLOCKING: payfound] now Alice's turn to make sure payment is confrmed and send in claim or see bob's reclaim and reclaim instantdex_addevent(s,*n,"BTC_waitpayment","payfound","gotpaytx","BTC_makeclaim"); // virt instantdex_addevent(s,*n,"BTC_waitpayment","gotpaytx","poll","BTC_waitpayment"); - instantdex_addevent(s,*n,"BTC_waitpayment","poll","poll","BTC_waitpayment"); + instantdex_addevent(s,*n,"BTC_waitpayment","sentprivs","poll","BTC_waitpayment"); + instantdex_addevent(s,*n,"BTC_waitpayment","poll","sentprivs","BTC_waitpayment"); // [BLOCKING: privM] Bob waits for privM either from Alice or alt blockchain instantdex_addevent(s,*n,"BTC_makeclaim","claimed","didclaim","BTC_done"); instantdex_addevent(s,*n,"BTC_makeclaim","didclaim","poll","BTC_cashmsig"); - instantdex_addevent(s,*n,"BTC_makeclaim","poll","poll","BTC_makeclaim"); + instantdex_addevent(s,*n,"BTC_makeclaim","poll","sentprivs","BTC_makeclaim"); instantdex_addevent(s,*n,"BTC_cashmsig","gotprivM","didmsig","BTC_done"); - instantdex_addevent(s,*n,"BTC_cashmsig","poll","poll","BTC_cashmsig"); + instantdex_addevent(s,*n,"BTC_cashmsig","poll","sentprivs","BTC_cashmsig"); /*s = instantdex_statecreate(s,n,"ALICE_checkbobreclaim",ALICE_checkbobreclaimfunc,0,"ALICE_reclaimed",0,0); instantdex_addevent(s,*n,"ALICE_checkbobreclaim","brefound","poll","ALICE_reclaimed");