Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Sep 5, 2023
1 parent e3d3818 commit 84d9db0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/transactions/test/InvokeHostFunctionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Restore Instance and WASM
restoreOp(contractKeys,
127 /* rent bump */ + 40000 /* two LE-writes */);
163 /* rent bump */ + 40000 /* two LE-writes */);

// Instance should now be useable
putWithFootprint(
Expand All @@ -1207,7 +1207,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Only restore contract instance
restoreOp({contractKeys[0]},
38 /* rent bump */ + 20000 /* one LE write */);
49 /* rent bump */ + 20000 /* one LE write */);

// invocation should fail
putWithFootprint(
Expand All @@ -1225,7 +1225,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Only restore WASM
restoreOp({contractKeys[1]},
90 /* rent bump */ + 20000 /* one LE write */);
114 /* rent bump */ + 20000 /* one LE write */);

// invocation should fail
putWithFootprint(
Expand All @@ -1243,16 +1243,16 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Restore Instance and WASM
restoreOp(contractKeys,
127 /* rent bump */ + 40000 /* two LE writes */);
163 /* rent bump */ + 40000 /* two LE writes */);

auto instanceBumpAmount = 10'000;
auto wasmBumpAmount = 15'000;

// bump instance
bumpOp(instanceBumpAmount, {contractKeys[0]}, 20039);
bumpOp(instanceBumpAmount, {contractKeys[0]}, 20050);

// bump WASM
bumpOp(wasmBumpAmount, {contractKeys[1]}, 20178);
bumpOp(wasmBumpAmount, {contractKeys[1]}, 20225);

checkEntry(contractKeys[0], ledgerSeq + instanceBumpAmount);
checkEntry(contractKeys[1], ledgerSeq + wasmBumpAmount);
Expand Down Expand Up @@ -1362,7 +1362,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
ContractDataDurability::PERSISTENT),
contractDataKey(contractID, makeSymbolSCVal("key3"),
ContractDataDurability::PERSISTENT)},
40074); // only 2 ledger writes because key3 won't be bumped
40097); // only 2 ledger writes because key3 won't be bumped

checkContractDataExpirationLedger(
"key", ContractDataDurability::PERSISTENT, ledgerSeq + 10'100);
Expand Down Expand Up @@ -1420,7 +1420,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
1;

// Bump instance and WASM so that they don't expire during the test
bumpOp(10'000, contractKeys, 40151);
bumpOp(10'000, contractKeys, 40194);

put("key", 0, ContractDataDurability::PERSISTENT);
checkContractDataExpirationLedger(
Expand Down Expand Up @@ -1462,7 +1462,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
"key", ContractDataDurability::PERSISTENT, initExpirationLedger);

// Restore the entry
restoreOp({lk}, 20038);
restoreOp({lk}, 20049);

ledgerSeq = getLedgerSeq(*app);
checkContractDataExpirationState(
Expand Down

5 comments on commit 84d9db0

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from graydon
at sisuresh@84d9db0

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sisuresh/stellar-core/bump-env = 84d9db0 into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sisuresh/stellar-core/bump-env = 84d9db0 merged ok, testing candidate = 2b283bd

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 2b283bd

Please sign in to comment.