Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1405 from helium/pevm/dialzzz
Browse files Browse the repository at this point in the history
dialyzer fix for different ledger fetch path
  • Loading branch information
evanmcc authored Jun 24, 2022
2 parents e46ddc3 + 15d7ca6 commit 3631a65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 4 additions & 8 deletions src/state_channel/blockchain_state_channel_common.erl
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ handle_server_msg(
BannerSC ->
lager:debug("sc_handler client got banner, sc_id: ~p",
[blockchain_state_channel_v1:id(BannerSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse is_active_sc(BannerSC, Ledger) == ok of
case is_active_sc(BannerSC, Ledger) == ok of
true ->
blockchain_state_channels_client:banner(Banner, self());
false ->
Expand All @@ -225,8 +224,7 @@ handle_server_msg(
PurchaseSC = blockchain_state_channel_purchase_v1:sc(Purchase),
lager:debug("sc_handler client got purchase, sc_id: ~p",
[blockchain_state_channel_v1:id(PurchaseSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse is_active_sc(PurchaseSC, Ledger) == ok of
case is_active_sc(PurchaseSC, Ledger) == ok of
true ->
blockchain_state_channels_client:purchase(Purchase, self());
false ->
Expand All @@ -253,8 +251,7 @@ handle_client_msg(Msg, HandlerState) ->
BannerSC ->
lager:debug("sc_handler client got banner, sc_id: ~p",
[blockchain_state_channel_v1:id(BannerSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse is_active_sc(BannerSC, Ledger) == ok of
case is_active_sc(BannerSC, Ledger) == ok of
true ->
blockchain_state_channels_client:banner(Banner, self());
false ->
Expand All @@ -265,8 +262,7 @@ handle_client_msg(Msg, HandlerState) ->
PurchaseSC = blockchain_state_channel_purchase_v1:sc(Purchase),
lager:debug("sc_handler client got purchase, sc_id: ~p",
[blockchain_state_channel_v1:id(PurchaseSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse is_active_sc(PurchaseSC, Ledger) == ok of
case is_active_sc(PurchaseSC, Ledger) == ok of
true ->
blockchain_state_channels_client:purchase(Purchase, self());
false ->
Expand Down
6 changes: 2 additions & 4 deletions src/state_channel/blockchain_state_channel_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ handle_data(client, Data, HandlerState) ->
BannerSC ->
lager:debug("sc_handler client got banner, sc_id: ~p",
[blockchain_state_channel_v1:id(BannerSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse blockchain_state_channel_common:is_active_sc(BannerSC, Ledger) == ok of
case blockchain_state_channel_common:is_active_sc(BannerSC, Ledger) == ok of
true ->
blockchain_state_channels_client:banner(Banner, self());
false ->
Expand All @@ -123,8 +122,7 @@ handle_data(client, Data, HandlerState) ->
PurchaseSC = blockchain_state_channel_purchase_v1:sc(Purchase),
lager:debug("sc_handler client got purchase, sc_id: ~p",
[blockchain_state_channel_v1:id(PurchaseSC)]),
%% either we don't have a ledger or we do and the SC is valid
case Ledger == undefined orelse blockchain_state_channel_common:is_active_sc(PurchaseSC, Ledger) == ok of
case blockchain_state_channel_common:is_active_sc(PurchaseSC, Ledger) == ok of
true ->
blockchain_state_channels_client:purchase(Purchase, self());
false ->
Expand Down

0 comments on commit 3631a65

Please sign in to comment.