Skip to content

Commit

Permalink
updated revert message for threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
dusannosovic-ethernal committed Dec 11, 2024
1 parent 407f098 commit 701fc43
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion contracts/blade/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.19;
import "./ValidatorSetStorage.sol";
import "../interfaces/IGateway.sol";
import "../lib/Merkle.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Gateway is ValidatorSetStorage, IGateway {
uint256 public constant MAX_LENGTH = 2048;
Expand Down Expand Up @@ -93,7 +94,17 @@ 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");
revert(
string(
abi.encodePacked(
"batch [start id ",
Strings.toString(signedBridgeBatch.startId),
" - end id ",
Strings.toString(signedBridgeBatch.endId),
"] has timed out"
)
)
);
}

uint256 length = batchMessages.length;
Expand Down

0 comments on commit 701fc43

Please sign in to comment.