Skip to content

Commit eb96e7f

Browse files
authored
Merge pull request #16 from perun-network/15-emit-concluded-once
🐛 [Adjudicator] Emit concluded only once
2 parents 01699bf + 1924335 commit eb96e7f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contracts/Adjudicator.sol

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,10 @@ contract Adjudicator {
466466
function forceConcludeSingle(Channel.State memory state) internal {
467467
Dispute memory dispute = requireGetDispute(state.channelID);
468468
require(dispute.stateHash == hashState(state), "invalid channel state");
469-
dispute.phase = uint8(DisputePhase.CONCLUDED);
470-
setDispute(state.channelID, dispute);
469+
if (dispute.phase != uint8(DisputePhase.CONCLUDED)) {
470+
dispute.phase = uint8(DisputePhase.CONCLUDED);
471+
setDispute(state.channelID, dispute);
472+
}
471473
}
472474

473475
/**

0 commit comments

Comments
 (0)