forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not build empty blocks on detecting an overflow
also stop processing transactions when the block timer has ticked to give more consistent block times
- Loading branch information
Showing
4 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.15; | ||
|
||
contract GasBurner { | ||
constructor() { | ||
//dynamic array | ||
uint[] memory a = new uint[](12000); | ||
for (uint i = 0; i < 2000; i++) { | ||
a[i%10000] = i; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
async function main() { | ||
try { | ||
// Get the ContractFactory of your BigLoopContract | ||
const GasBurnerContract = await hre.ethers.getContractFactory("GasBurner"); | ||
|
||
// Deploy the contract | ||
const contract = await GasBurnerContract.deploy(); | ||
// Wait for the deployment transaction to be mined | ||
await contract.waitForDeployment(); | ||
|
||
console.log(`GasBurner deployed to: ${await contract.getAddress()}`); | ||
|
||
// const result = await contract.bigLoop(10000); | ||
// console.log(result); | ||
} catch (error) { | ||
console.error(error); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters