Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #160 from helium/madninja/ecc508_sleep
Browse files Browse the repository at this point in the history
Bump ecc508, use sleep instead of idle
  • Loading branch information
Vagabond authored Jul 31, 2019
2 parents 2658adb + 0a6c797 commit 622a5db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
0},
{<<"ecc508">>,
{git,"https://github.com/helium/ecc508.git",
{ref,"5b6059342f8357362b20c61b0080a9ea13b76a6f"}},
{ref,"bf8d708b4335b1783a2a72aec5b8103e2459fca5"}},
0},
{<<"ecc_compact">>,{pkg,<<"ecc_compact">>,<<"1.0.4">>},2},
{<<"enacl">>,{pkg,<<"enacl">>,<<"0.17.2">>},2},
Expand Down
4 changes: 2 additions & 2 deletions src/miner_ecc_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ init([KeySlot]) ->
handle_call({sign, Binary}, _From, State=#state{ecc_handle=Pid}) ->
ecc508:wake(Pid),
Reply = ecc508:sign(Pid, State#state.key_slot, Binary),
ecc508:idle(Pid),
ecc508:sleep(Pid),
{reply, Reply, State};
handle_call({ecdh, PubKey}, _From, State=#state{ecc_handle=Pid}) ->
ecc508:wake(Pid),
Reply = ecc508:ecdh(Pid, State#state.key_slot, PubKey),
ecc508:idle(Pid),
ecc508:sleep(Pid),
{reply, Reply, State};

handle_call(_Msg, _From, State) ->
Expand Down

0 comments on commit 622a5db

Please sign in to comment.