Skip to content

Commit b67ece0

Browse files
[ETCM-912] Fix failing Call opcodes spec
1 parent 562a127 commit b67ece0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/scala/io/iohk/ethereum/vm/CallOpcodesPostEip2929Spec.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ import Fixtures.blockchainConfig
1919

2020
class MagnetoCallOpFixture(config: EvmConfig)
2121
extends CallOpFixture(config, MockWorldState(touchedAccounts = Set.empty)) {
22+
2223
override val fakeHeader: BlockHeader =
2324
BlockFixtures.ValidBlock.header.copy(number = Fixtures.MagnetoBlockNumber, unixTimestamp = 0)
25+
26+
override val requiredGas: BigInt = {
27+
val storageCost = 3 * (config.feeSchedule.G_sset + config.feeSchedule.G_cold_account_access)
28+
val memCost = config.calcMemCost(0, 0, 32)
29+
val copyCost = config.feeSchedule.G_copy * wordsForBytes(32)
30+
31+
extCode.linearConstGas(config) + storageCost + memCost + copyCost
32+
}
2433
}
2534

2635
class CallOpcodesPostEip2929Spec

0 commit comments

Comments
 (0)