From 94e848234f83a90fa74162450ee218da9b2e7ac4 Mon Sep 17 00:00:00 2001 From: huyhuynh3103 Date: Fri, 2 Feb 2024 11:37:52 +0700 Subject: [PATCH] chore: remove update operator test --- test/bridge/integration/BaseIntegration.t.sol | 5 -- .../integration/bridge-tracking/.gitkeep | 0 .../depositVote.RoninGatewayV3.t.sol | 58 ------------------- 3 files changed, 63 deletions(-) delete mode 100644 test/bridge/integration/bridge-tracking/.gitkeep diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 47b1495d7..0e6f875e5 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -563,15 +563,10 @@ contract BaseIntegration_Test is Base_Test { function _wrapUpEpoch() internal { uint256 multiplier = _validatorSet.numberOfBlocksInEpoch(); - console.log("Before roll block.number: ", block.number); - vm.roll((block.number / multiplier + 1) * multiplier - 1); - console.log("After roll block.number: ", block.number); vm.prank(block.coinbase); - console.log("Before wrap up", _validatorSet.currentPeriod()); _validatorSet.wrapUpEpoch(); - console.log("After wrap up", _validatorSet.currentPeriod()); } function _setTimestampToPeriodEnding() internal { diff --git a/test/bridge/integration/bridge-tracking/.gitkeep b/test/bridge/integration/bridge-tracking/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index b6da50d5a..f0e13164e 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -15,8 +15,6 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { Transfer.Receipt[] _depositReceipts; uint256 _numOperatorsForVoteExecuted; - Transfer.Receipt[] first50Receipts; - Transfer.Receipt[] second50Receipts; function setUp() public virtual override { super.setUp(); @@ -83,60 +81,4 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { assertEq(totalWeight, (_numOperatorsForVoteExecuted) * 100); } } - - function test_bulkDeposit_100Txs() public { - _setTimestampToPeriodEnding(); - _wrapUpEpochAndMine(); - _wrapUpEpochAndMine(); - - vm.deal(address(_bridgeReward), 10 ether); - address newBridgeOperator = makeAddr("new-bridge-operator"); - Transfer.Receipt memory sampleReceipt = Transfer.Receipt({ - id: 0, - kind: Transfer.Kind.Deposit, - ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: _param.test.roninChainId }), - mainchain: Token.Owner({ - addr: makeAddr("requester"), - tokenAddr: address(_mainchainWeth), - chainId: _param.test.mainchainChainId - }), - info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) - }); - - uint256 id = 1; - for (uint256 i; i < 50; i++) { - first50Receipts.push(sampleReceipt); - second50Receipts.push(sampleReceipt); - first50Receipts[i].id = id; - second50Receipts[i].id = id + 50; - - id++; - } - - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { - vm.prank(_param.roninBridgeManager.bridgeOperators[i]); - _roninGatewayV3.tryBulkDepositFor(first50Receipts); - } - - vm.prank(_param.roninBridgeManager.governors[0]); - _roninBridgeManager.updateBridgeOperator(newBridgeOperator); - - _param.roninBridgeManager.bridgeOperators[0] = newBridgeOperator; - - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { - vm.prank(_param.roninBridgeManager.bridgeOperators[i]); - _roninGatewayV3.tryBulkDepositFor(second50Receipts); - } - - _setTimestampToPeriodEnding(); - _wrapUpEpochAndMine(); - _wrapUpEpochAndMine(); - - sampleReceipt.id = 101; - - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { - vm.prank(_param.roninBridgeManager.bridgeOperators[i]); - _roninGatewayV3.depositFor(sampleReceipt); - } - } }