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

Commit

Permalink
allow versions higher than 1 without code updates in these paths
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldjeffrey committed Feb 7, 2022
1 parent 8439ef6 commit 16de626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ is_valid(Txn, Chain) ->
{ok, LedgerSC} ->
CloseState = blockchain_ledger_state_channel_v2:close_state(LedgerSC),
case {CloseState, SCDisputeStrategy} of
{dispute, 1} -> {error, already_disputed};
{dispute, Ver} when Ver >= 1 -> {error, already_disputed};
_ ->
case Owner == Closer of
%% check the owner's close conditions
Expand Down
2 changes: 1 addition & 1 deletion src/transactions/v2/blockchain_txn_rewards_v2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ dc_reward(Txn, End, AccIn, Ledger, #{ sc_grace_blocks := GraceBlocks,
SCDisputeStrategy = maps:get(?sc_dispute_strategy_version, Vars, 0),
{Summaries, Bonus} =
case {SCDisputeStrategy, CloseState} of
{1, dispute} ->
{Ver, dispute} when Ver >= 1 ->
%% When sc_dispute_strategy_version is 1 we want to zero out as much as possible.
%% No Bonuses, no summaries. All slashed.
{[], 0};
Expand Down

0 comments on commit 16de626

Please sign in to comment.