Skip to content

Commit b86174a

Browse files
committed
test: borrow some so gas snapshots are more meaningful
1 parent 794aaf1 commit b86174a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

snapshots/Pool.Operations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"repay: partial repay": "189971",
1010
"supply: collateralDisabled": "146829",
1111
"supply: collateralEnabled": "146829",
12-
"supply: first supply->collateralEnabled": "188344",
12+
"supply: first supply->collateralEnabled": "176387",
1313
"withdraw: full withdraw": "165303",
1414
"withdraw: partial withdraw": "181992"
1515
}

tests/gas/Pool.Operations.gas.t.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ contract PoolOperations_gas_Tests is Testhelpers {
1616
address liquidator = makeAddr('liquidator');
1717

1818
function test_supply() external {
19+
// borrow some, so hf checks are not skipped
20+
_supplyOnReserve(supplier, 1 ether, tokenList.weth);
21+
_borrowArbitraryAmount(supplier, 1e5, tokenList.wbtc);
22+
1923
_supplyOnReserve(supplier, 100e6, tokenList.usdx);
2024
vm.snapshotGasLastCall('Pool.Operations', 'supply: first supply->collateralEnabled');
2125

@@ -150,6 +154,9 @@ contract PoolOperations_gas_Tests is Testhelpers {
150154
type(uint256).max,
151155
false
152156
);
153-
vm.snapshotGasLastCall('Pool.Operations', 'liquidationCall: deficit on liquidated asset + other asset');
157+
vm.snapshotGasLastCall(
158+
'Pool.Operations',
159+
'liquidationCall: deficit on liquidated asset + other asset'
160+
);
154161
}
155162
}

0 commit comments

Comments
 (0)