Skip to content

Commit 04da63e

Browse files
committed
update tests
1 parent 94aec0d commit 04da63e

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

packages/evm/bindings/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ impl EvmInner {
667667
Ok(match result {
668668
Ok(result) => PreverifyTxResult {
669669
success: true,
670-
initial_gas_used: result.initial_total_gas,
670+
initial_gas_used: result.initial_total_gas(),
671671
..Default::default()
672672
},
673673
Err(err) => PreverifyTxResult {

packages/evm/core/src/db.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ mod tests {
13171317
// 2) Update balance for account
13181318
let mut state = HashMap::default();
13191319

1320-
let mut account = revm::state::Account::new_not_existing(0);
1320+
let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO);
13211321
account.info.balance = U256::from(100);
13221322
account.status = revm::state::AccountStatus::Touched;
13231323

@@ -1402,7 +1402,7 @@ mod tests {
14021402
let address = address!("bd6f65c58a46427af4b257cbe231d0ed69ed5508");
14031403
let mut state = HashMap::default();
14041404

1405-
let mut account = revm::state::Account::new_not_existing(0);
1405+
let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO);
14061406
account.status = revm::state::AccountStatus::Touched;
14071407

14081408
let mut storage = HashMap::default();
@@ -1469,7 +1469,7 @@ mod tests {
14691469
let address = address!("bd6f65c58a46427af4b257cbe231d0ed69ed5508");
14701470
let mut state = HashMap::default();
14711471

1472-
let mut account = revm::state::Account::new_not_existing(0);
1472+
let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO);
14731473
account.status = revm::state::AccountStatus::Touched;
14741474

14751475
let mut storage = HashMap::default();
@@ -1572,7 +1572,8 @@ mod tests {
15721572

15731573
let mut state = HashMap::default();
15741574

1575-
let mut account = revm::state::Account::new_not_existing(0);
1575+
let mut account =
1576+
revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO);
15761577
account.status = revm::state::AccountStatus::Touched;
15771578

15781579
let mut storage = HashMap::default();

tests/functional/transaction-pool-api/source/evm-call.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe<{
135135
assert.true(await isTransactionCommitted(context, tx));
136136

137137
const legacyAfter = await evm.getAccountInfo(legacyColdWallet.mainsailAddress);
138-
assert.equal(legacyAfter.balance, legacyBefore.balance - 108160000000000n - 5n);
138+
assert.equal(legacyAfter.balance, legacyBefore.balance - 112900000000000n - 5n);
139139

140140
const recipientAfter = await evm.getAccountInfo(randomWallet.address);
141141
assert.equal(recipientAfter.balance, 5n);
@@ -157,7 +157,7 @@ describe<{
157157
const recipientBefore = await evm.getAccountInfo(randomWallet.address);
158158
assert.equal(recipientBefore.balance, 0n);
159159

160-
const gasSpentPerTx = 108160000000000n;
160+
const gasSpentPerTx = 112900000000000n;
161161
const valuePerTx = 5n;
162162
const N = 10n;
163163

0 commit comments

Comments
 (0)