From 0201509aae8995dc0102fcb1a4e42eae0cf28527 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 5 Mar 2024 15:35:12 +0000 Subject: [PATCH] WIP --- l1-contracts/test/NewInbox.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/l1-contracts/test/NewInbox.t.sol b/l1-contracts/test/NewInbox.t.sol index b1f015658f6..23fea271384 100644 --- a/l1-contracts/test/NewInbox.t.sol +++ b/l1-contracts/test/NewInbox.t.sol @@ -196,8 +196,13 @@ contract NewInboxTest is Test { // Now we consume the trees for (uint256 i = 0; i < numTreesToConsume; i++) { + uint256 expectedNumTrees = + (inbox.getToConsume() + 1 == inbox.getInProgress()) ? numTrees + 1 : numTrees; bytes32 root = inbox.consume(); + // We perform this check to verify that new tree initialization works as expected + assertEq(inbox.getNumTrees(), expectedNumTrees, "Unexptected number of trees"); + // We perform empty roots check only after first batch because after second one the following simple accounting // does not work if (isFirstRun) {