Skip to content

Commit

Permalink
Use ExitFormat.encode to silence error
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Apr 5, 2022
1 parent 744dbbe commit 3b4bfba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nitro-protocol/contracts/CountingApp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ pragma solidity 0.7.4;
pragma experimental ABIEncoderV2;

import './interfaces/IForceMoveApp.sol';
import '@statechannels/exit-format/contracts/ExitFormat.sol';


/**
* @dev The CountingApp contracts complies with the ForceMoveApp interface and allows only for a simple counter to be incremented. Used for testing purposes.
Expand Down Expand Up @@ -41,7 +43,7 @@ contract CountingApp is IForceMoveApp {
'Counter must be incremented'
);
// Note this is gas inefficient, and inferior to _bytesEqual in use elsewhere
require(keccak256(b.outcome) == keccak256(a.outcome), 'Outcome must not change');
require(keccak256(ExitFormat.encodeExit(b.outcome)) == keccak256(ExitFormat.encodeExit(a.outcome)), 'Outcome must not change');
return true;
}
}

0 comments on commit 3b4bfba

Please sign in to comment.