Skip to content

Commit

Permalink
NearOnEthClinet: add message for BP num limit. (#650)
Browse files Browse the repository at this point in the history
* Add an explicit message if the number of block producers for the provided block is bigger than `MAX_BLOCK_PRODUCERS`

Co-authored-by: Septen <[email protected]>
  • Loading branch information
sept-en authored Dec 14, 2021
1 parent 93a1f2d commit b0d31dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/eth/nearbridge/contracts/NearBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ contract NearBridge is INearBridge, AdminControlled {

function setBlockProducers(NearDecoder.BlockProducer[] memory src, Epoch storage epoch) internal {
uint cnt = src.length;
require(cnt <= MAX_BLOCK_PRODUCERS);
require(cnt <= MAX_BLOCK_PRODUCERS, "It is not expected having that many block producers for the provided block");
epoch.numBPs = cnt;
unchecked {
for (uint i = 0; i < cnt; i++) {
Expand Down

0 comments on commit b0d31dd

Please sign in to comment.