Commit aca9ac45 authored by Inphi's avatar Inphi Committed by GitHub

ctb: Fix FDG claim counteredBy (#9368)

* ctb: Fix FDG claim counteredBy

* follow proper semver conventions
parent 85e5729e
This diff is collapsed.
......@@ -96,8 +96,8 @@
"sourceCodeHash": "0xe1891e7e6a1928b9a2ddc47d1f010650f1125a0617b8bf32190176a3bb674b4f"
},
"src/dispute/FaultDisputeGame.sol": {
"initCodeHash": "0x4755dd5a5400731d68995a6fbd8219c82faf0b009b9db96162d8953526d856f5",
"sourceCodeHash": "0xe774740ba445211a3017bc78e30b0fc07e25f30e48fe788907e9564408678502"
"initCodeHash": "0x04fc1926f2ccd02a2c065e4dd0e562be7c8c498d76d6d860cc394fd74fffca06",
"sourceCodeHash": "0x1e539ba88487b2ec1359577dbd82270fddbabc3b8982dc6dc1a4a5169318e479"
},
"src/legacy/DeployerWhitelist.sol": {
"initCodeHash": "0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d",
......
......@@ -81,8 +81,8 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
bool internal initialized;
/// @notice Semantic version.
/// @custom:semver 0.1.0
string public constant version = "0.1.0";
/// @custom:semver 0.2.0
string public constant version = "0.2.0";
/// @param _gameType The type ID of the game.
/// @param _absolutePrestate The absolute prestate of the instruction trace.
......@@ -268,6 +268,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
claimData.push(
ClaimData({
parentIndex: uint32(_challengeIndex),
// This is updated during subgame resolution
counteredBy: address(0),
claimant: msg.sender,
bond: uint128(msg.value),
......@@ -277,9 +278,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
})
);
// Set the parent claim as countered.
claimData[_challengeIndex].counteredBy = msg.sender;
// Update the subgame rooted at the parent claim.
subgames[_challengeIndex].push(claimData.length - 1);
......
......@@ -407,7 +407,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Assert correctness of the parent claim's data.
assertEq(parentIndex, type(uint32).max);
assertEq(counteredBy, address(this));
assertEq(counteredBy, address(0));
assertEq(claimant, DEFAULT_SENDER);
assertEq(bond, 0);
assertEq(claim.raw(), ROOT_CLAIM.raw());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment