From 6079f3b594156de02709c858799b8da2ecb1cc31 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 8 Feb 2017 11:15:44 +0200 Subject: [PATCH] added print stament --- channel_test.sh | 20 ++++++++++---------- src/channels/channel_feeder.erl | 4 ++-- src/networking/handler.erl | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/channel_test.sh b/channel_test.sh index 80fde499..02e2693c 100644 --- a/channel_test.sh +++ b/channel_test.sh @@ -7,22 +7,22 @@ curl -i -d '["add_peer", [127,0,0,1], 3010]' http://localhost:3021 curl -i -d '["add_peer", [127,0,0,1], 3020]' http://localhost:3011 -curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 -curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 -sleep 1 -curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 -sleep 1 -curl -i -d '["mine_block", 1, 1000000]' http://localhost:3021 +#curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 +#curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 +#sleep 1 +#curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 +#sleep 1 +#curl -i -d '["mine_block", 1, 1000000]' http://localhost:3021 sleep 1 curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 sleep 1 curl -i -d '["new_channel", [127,0,0,1], 3020, 1, 10000, 4000, 0, 4]' http://localhost:3011 sleep 1 -curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 -sleep 1 -curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 -sleep 1 +#curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 +#sleep 1 +#curl -i -d '["mine_block", 1, 1000000]' http://localhost:3011 +#sleep 1 curl -i -d '["sync", [127,0,0,1], 3020]' http://localhost:3011 sleep 1 curl -i -d '["channel_spend", [127,0,0,1], 3020, 27]' http://localhost:3011 diff --git a/src/channels/channel_feeder.erl b/src/channels/channel_feeder.erl index 75ae9841..03e2b402 100644 --- a/src/channels/channel_feeder.erl +++ b/src/channels/channel_feeder.erl @@ -134,8 +134,8 @@ handle_call({agree_bet, Name, SSPK, Vars, Secret}, _From, X) -> Return = make_bet_internal(Other, Name, Vars, Secret), update_to_me_internal(Return, SSPK), {reply, Return, X}; -handle_call({make_simplification, Other, Name, OtherSecret}, _From, X) -> - Z = make_simplification_internal(Other, Name, OtherSecret), +handle_call({make_simplification, Other, Name, OtherSS}, _From, X) -> + Z = make_simplification_internal(Other, Name, OtherSS), {reply, Z, X}; handle_call({agree_simplification, Name, SSPK, OtherSS}, _From, X) -> {Accounts, _,_,_} = tx_pool:data(), diff --git a/src/networking/handler.erl b/src/networking/handler.erl index 6473bb66..1e4d0357 100644 --- a/src/networking/handler.erl +++ b/src/networking/handler.erl @@ -106,6 +106,8 @@ doit({dice, 1, Other, Commit, Amount}) -> {ok, SSPK, MyCommit}; doit({dice, 2, ID, SSPK, SS}) -> channel_feeder:update_to_me(SSPK), + io:fwrite("handler dice 2 "), + disassembler:doit(SS), {SSPKsimple, MySecret} = channel_feeder:make_simplification(ID, dice, SS), {ok, SSPKsimple, MySecret}; doit({dice, 3, _ID, SSPK}) ->