Skip to content

Commit

Permalink
revert test
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Feb 4, 2024
1 parent 9055978 commit 9e7acbc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/Channel.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract ChannelTest is Test, Verifier {
encoded: ""
});
assertEq(msgHash, hash(message));
Proof memory proof = Proof({messageIndex: 0, messageProof: channel.prove()});
Proof memory proof = Proof({blockNumber: block.number, messageIndex: 0, messageProof: channel.prove()});
vm.chainId(2);
channel.recvMessage(message, abi.encode(proof));
}
Expand All @@ -89,7 +89,7 @@ contract ChannelTest is Test, Verifier {
encoded: ""
});
assertEq(msgHash, hash(message));
Proof memory proof = Proof({messageIndex: index, messageProof: channel.prove()});
Proof memory proof = Proof({blockNumber: block.number, messageIndex: index, messageProof: channel.prove()});
vm.chainId(2);
channel.recvMessage(message, abi.encode(proof));
}
Expand Down
2 changes: 1 addition & 1 deletion test/ORMP.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contract ORMPTest is Test, Verifier {
function perform_send() public {
uint256 f = ormp.fee(2, self, 0, "", "");
ormp.send{value: f}(2, self, 0, "", self, "");
proof = Proof({messageIndex: ormp.messageCount() - 1, messageProof: ormp.prove()});
proof = Proof({blockNumber: block.number, messageIndex: ormp.messageCount() - 1, messageProof: ormp.prove()});
vm.chainId(2);
}

Expand Down
2 changes: 1 addition & 1 deletion test/Verifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract VerifierTest is Test, Verifier {
function test_verifyMessageProof() public {
bytes32 msgHash = bytes32(uint256(1));
imt.insert(msgHash);
Proof memory proof = Proof({messageIndex: 0, messageProof: zeroHashes});
Proof memory proof = Proof({blockNumber: block.number, messageIndex: 0, messageProof: zeroHashes});
bool r = this.verifyMessageProof(1, msgHash, abi.encode(proof));
assertEq(r, true);
}
Expand Down
3 changes: 2 additions & 1 deletion test/bench/ORMP.b.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ contract ORMPBenchmarkTest is Test {

function perform_recv(Message memory message) public {
root = ormp.root();
Verifier.Proof memory proof = Verifier.Proof({messageIndex: message.index, messageProof: ormp.prove()});
Verifier.Proof memory proof =
Verifier.Proof({blockNumber: block.number, messageIndex: message.index, messageProof: ormp.prove()});

vm.createSelectFork(message.toChainId.toChainName());
// TODO: setDefaltOracle
Expand Down

0 comments on commit 9e7acbc

Please sign in to comment.