Skip to content

Commit

Permalink
Update LibEthDepositing.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Jun 2, 2023
1 parent 1611a06 commit 93f2805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/protocol/contracts/L1/libs/LibEthDepositing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ library LibEthDepositing {
TaikoData.EthDeposit storage deposit = state.ethDeposits[i];
if (deposit.amount > feePerDeposit) {
totalFee += feePerDeposit;

depositsProcessed[j].recipient = deposit.recipient;
depositsProcessed[j].amount =
deposit.amount - feePerDeposit;
depositsProcessed[j].id = deposit.id;

++j;
} else {
totalFee += deposit.amount;
}

// delete the deposit
deposit.recipient = address(0);
deposit.amount = 0;
++i;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/test/TaikoL1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ contract TaikoL1Test is TaikoL1TestBase {
proposeBlock(Alice, 1_000_000, 1024);

// Expected:
// 0x9098dca53e2412a11d456add7b3652df403e043b2a20f456d4651b9a73b70a30 (pre
// 0x60386add6a400d9b23968e1239bd600d22d2eea4709246895c0e5d8f5ae49dc3 (pre
// calculated with these values)
//console2.logBytes32(meta.depositsRoot);
assertEq(
LibEthDepositing.hashEthDeposits(meta.depositsProcessed),
0x9098dca53e2412a11d456add7b3652df403e043b2a20f456d4651b9a73b70a30
0x60386add6a400d9b23968e1239bd600d22d2eea4709246895c0e5d8f5ae49dc3
);
}
}

0 comments on commit 93f2805

Please sign in to comment.