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

Commit

Permalink
review tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Apr 11, 2022
1 parent 7b93e76 commit 029143d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/handlers/miner_hbbft_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
%% TODO No need to pass Meta when tuple. Use sum type: {map, Meta} | tuple
metadata(Version, Meta, Chain) ->
{ok, HeadHash} = blockchain:head_hash(Chain),
Ledger = blockchain:ledger(Chain),
%% construct a 2-tuple of the system time and the current head block hash as our stamp data
case Version of
tuple ->
Expand Down
11 changes: 0 additions & 11 deletions src/poc/miner_poc_mgr_db_owner.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
-export([start_link/1,
db/0,
poc_mgr_cf/0,
write/2,
gc/1
]).

Expand Down Expand Up @@ -57,11 +56,6 @@ db() ->
poc_mgr_cf() ->
gen_server:call(?MODULE, poc_mgr_cf).

-spec write( POC :: miner_poc_mgr:local_poc(),
Skewed :: skewed:skewed()) -> ok.
write(POC, Skewed) ->
gen_server:cast(?MODULE, {write, POC, Skewed}).

-spec gc( [ miner_poc_mgr:local_poc_onion_key_hash() ] ) -> ok.
gc(IDs) ->
gen_server:call(?MODULE, {gc, IDs}, infinity).
Expand Down Expand Up @@ -94,11 +88,6 @@ handle_call(_Msg, _From, State) ->
lager:warning("rcvd unknown call msg: ~p from: ~p", [_Msg, _From]),
{reply, ok, State}.

handle_cast({write, POC, Skewed}, #state{pending=P}=State) ->
POCID = miner_poc_mgr:local_poc_key(POC),
%% defer encoding until write time
NewP = maps:put(POCID, {POC, Skewed}, P),
{noreply, State#state{pending=NewP}};
handle_cast(_Msg, State) ->
lager:warning("rcvd unknown cast msg: ~p", [_Msg]),
{noreply, State}.
Expand Down

0 comments on commit 029143d

Please sign in to comment.