Commit eba42bd4 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

add time window

parent d8b1f47c
......@@ -56,7 +56,7 @@ contract Witness is IWitness, Ownable {
if (dailyMerkleRootVerifiedMap[_date]) {
return;
}
require(block.timestamp - lastMerkleRootUpdate >= 3600 * 24, "Too soon");
require(block.timestamp - lastMerkleRootUpdate >= (3600 * 24 - 300), "Too soon");
bytes32 rootHash = keccak256(abi.encodePacked(_merkleRoot, _merkleSumRoot));
dailyMerkleRootSubmitCountMap[_date][rootHash] ++;
......
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