Skip to content

Commit

Permalink
refactor: adding transactions_per_block constant in Smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerTaule committed Sep 9, 2022
1 parent 382acdc commit 4476d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions nightfall-deployer/contracts/Config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ contract Config is Ownable, Structures {
uint256 constant ROTATE_PROPOSER_BLOCKS = 4;
uint256 constant COOLING_OFF_PERIOD = 1 weeks;
bytes32 constant ZERO = bytes32(0);
uint256 constant TRANSACTIONS_PER_BLOCK = 32;

address bootProposer;
address bootChallenger;
Expand Down
2 changes: 1 addition & 1 deletion nightfall-deployer/contracts/State.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ contract State is Initializable, ReentrancyGuardUpgradeable, Pausable, Config {
require(BLOCK_STAKE <= msg.value, 'The stake payment is incorrect');
require(b.proposer == msg.sender, 'The proposer address is not the sender');
// set the maximum tx/block to prevent unchallengably large blocks
require(t.length < 33, 'The block has too many transactions');
require(t.length <= TRANSACTIONS_PER_BLOCK, 'The block has too many transactions');

uint256 feePaymentsEth = 0;
uint256 feePaymentsMatic = 0;
Expand Down

0 comments on commit 4476d9d

Please sign in to comment.