Skip to content

Commit 88aad58

Browse files
committed
test confirming you can re-add a previously unregistered pool
1 parent df6b090 commit 88aad58

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/FactoryTest.t.sol

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ contract FactoryTest is EulerSwapTestBase {
404404
assertEq(ps[0], bobPool);
405405
}
406406

407-
// Unregistering pool for Bob reverts due to an OOB access of the allPools array
408407
vm.startPrank(bob);
409408
evc.setAccountOperator(bob, bobPool, false);
410409
eulerSwapRegistry.unregisterPool();
@@ -419,6 +418,18 @@ contract FactoryTest is EulerSwapTestBase {
419418
address[] memory ps = eulerSwapRegistry.poolsByPair(asset0, asset1);
420419
assertEq(ps.length, 0);
421420
}
421+
422+
// Register Bob's pool again
423+
424+
vm.startPrank(bob);
425+
evc.setAccountOperator(bob, bobPool, true);
426+
eulerSwapRegistry.registerPool(bobPool);
427+
428+
{
429+
address[] memory ps = eulerSwapRegistry.pools();
430+
assertEq(ps.length, 1);
431+
assertEq(ps[0], bobPool);
432+
}
422433
}
423434

424435
/// @dev test that all conditions are required for the protocol fee timebomb

0 commit comments

Comments
 (0)