Skip to content

Commit

Permalink
fix: fix genesis test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Dec 24, 2022
1 parent f5b11d6 commit 8681baf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/protocol/test/genesis/generate_genesis.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ echo '
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"arrowGlacierBlock": 0,
"clique": {
"period": 0,
"epoch": 30000
Expand Down
22 changes: 20 additions & 2 deletions packages/protocol/test/genesis/generate_genesis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,28 @@ action("Generate Genesis", function () {

const [bytes, txNums] = await generateMaxSizeInvalidTxList(TaikoL2)

const tx = await TaikoL2.invalidateBlock(
await expect(
TaikoL2.invalidateBlock(
bytes,
5, // hint: TX_INVALID_SIG
0
)
).to.be.revertedWith("L2:sender")

const taikoL2WithGoldenTouchSigner = new hre.ethers.Contract(
TaikoL2Alloc.address,
require("../../artifacts/contracts/L2/TaikoL2.sol/TaikoL2.json").abi,
new hre.ethers.Wallet(
"92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38",
provider
)
)

const tx = await taikoL2WithGoldenTouchSigner.invalidateBlock(
bytes,
5, // hint: TX_INVALID_SIG
0
0,
{ gasPrice: 0 }
)

const receipt = await tx.wait()
Expand Down

0 comments on commit 8681baf

Please sign in to comment.