Skip to content

Commit

Permalink
check for threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
dusannosovic-ethernal committed Dec 5, 2024
1 parent 482eb53 commit d9e906f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/blade/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ contract Gateway is ValidatorSetStorage, IGateway {

verifySignature(bls.hashToPoint(DOMAIN_BRIDGE, hash), signedBridgeBatch.signature, signedBridgeBatch.bitmap);

if (block.number > signedBridgeBatch.threshold && !signedBridgeBatch.isRollback) {
revert("block number is bigger than threshold");
}

uint256 length = batchMessages.length;
for (uint256 i = 0; i < length; ) {
_executeBridgeMessage(batchMessages[i]);
Expand Down

0 comments on commit d9e906f

Please sign in to comment.