reduce imported but not used warning when evmc enabled
This commit is contained in:
parent
16bc2de1cf
commit
ecab64adab
|
@ -13,8 +13,6 @@ import
|
|||
proc newStateDB*(db: TrieDatabaseRef, pruneTrie: bool): AccountStateDB =
|
||||
newAccountStateDB(db, emptyRlpHash, pruneTrie)
|
||||
|
||||
import debug
|
||||
|
||||
proc toGenesisHeader*(db: BaseChainDB, sdb: AccountStateDB): BlockHeader
|
||||
{.raises: [Defect, RlpError].} =
|
||||
## Initialise block chain DB accounts derived from the `genesis.alloc` table
|
||||
|
|
|
@ -32,9 +32,6 @@ const
|
|||
prngSeed = 42
|
||||
|
||||
type
|
||||
SimpleTypePP = BlockNonce|EthAddress|Blob|BlockHeader
|
||||
SeqTypePP = EthAddress|BlockHeader
|
||||
|
||||
CliqueCfg* = ref object of RootRef
|
||||
db*: BaseChainDB ##\
|
||||
## All purpose (incl. blockchain) database.
|
||||
|
|
|
@ -15,12 +15,13 @@
|
|||
import
|
||||
../../computation,
|
||||
../../stack,
|
||||
../../state,
|
||||
../op_codes,
|
||||
./oph_defs,
|
||||
eth/common,
|
||||
stint,
|
||||
times
|
||||
stint
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import ../../state
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private, op handlers implementation
|
||||
|
|
|
@ -14,13 +14,11 @@
|
|||
|
||||
import
|
||||
../../../constants,
|
||||
../../../db/accounts_cache,
|
||||
../../../errors,
|
||||
../../../forks,
|
||||
../../computation,
|
||||
../../memory,
|
||||
../../stack,
|
||||
../../state,
|
||||
../../types,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
|
@ -32,6 +30,11 @@ import
|
|||
eth/common/eth_types,
|
||||
stint
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import
|
||||
../../state,
|
||||
../../../db/accounts_cache
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -20,7 +20,6 @@ import
|
|||
../../computation,
|
||||
../../memory,
|
||||
../../stack,
|
||||
../../state,
|
||||
../../types,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
|
@ -34,6 +33,11 @@ import
|
|||
stint,
|
||||
strformat
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import
|
||||
../../state,
|
||||
../../../db/accounts_cache
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private helpers
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -18,7 +18,6 @@ import
|
|||
../../computation,
|
||||
../../memory,
|
||||
../../stack,
|
||||
../../state,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
../op_codes,
|
||||
|
@ -30,6 +29,9 @@ import
|
|||
stint,
|
||||
strformat
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import ../../state
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private helpers
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
##
|
||||
|
||||
import
|
||||
../../../db/accounts_cache,
|
||||
../../../errors,
|
||||
../../state,
|
||||
../../types,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
|
@ -26,6 +24,10 @@ import
|
|||
|
||||
when defined(evmc_enabled):
|
||||
import ../../evmc_api, ../../evmc_helpers, evmc/evmc
|
||||
else:
|
||||
import
|
||||
../../state,
|
||||
../../../db/accounts_cache
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Public
|
||||
|
|
|
@ -13,13 +13,11 @@
|
|||
##
|
||||
|
||||
import
|
||||
../../../db/accounts_cache,
|
||||
../../../errors,
|
||||
../../code_stream,
|
||||
../../computation,
|
||||
../../memory,
|
||||
../../stack,
|
||||
../../state,
|
||||
../../types,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
|
@ -31,6 +29,11 @@ import
|
|||
stint,
|
||||
strformat
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import
|
||||
../../state,
|
||||
../../../db/accounts_cache
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private helpers
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -288,6 +291,9 @@ const
|
|||
## on machine state during execution.
|
||||
discard
|
||||
|
||||
#[
|
||||
EIP-2315: temporary disabled
|
||||
Reason : not included in berlin hard fork
|
||||
beginSubOp: Vm2OpFn = proc (k: var Vm2Ctx) =
|
||||
## 0x5c, Marks the entry point to a subroutine
|
||||
raise newException(
|
||||
|
@ -327,6 +333,7 @@ const
|
|||
|
||||
k.cpt.returnStack.add returnPC
|
||||
inc k.cpt.code.pc
|
||||
]#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Public, op exec table entries
|
||||
|
|
|
@ -13,12 +13,10 @@
|
|||
##
|
||||
|
||||
import
|
||||
../../../db/accounts_cache,
|
||||
../../../errors,
|
||||
../../computation,
|
||||
../../memory,
|
||||
../../stack,
|
||||
../../state,
|
||||
../../types,
|
||||
../gas_costs,
|
||||
../gas_meter,
|
||||
|
@ -29,6 +27,11 @@ import
|
|||
eth/common,
|
||||
stint
|
||||
|
||||
when not defined(evmc_enabled):
|
||||
import
|
||||
../../state,
|
||||
../../../db/accounts_cache
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Private
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -15,7 +15,7 @@ import
|
|||
../db/[db_chain, accounts_cache],
|
||||
../errors,
|
||||
../forks,
|
||||
../utils/[difficulty, ec_recover],
|
||||
../utils/[ec_recover],
|
||||
./transaction_tracer,
|
||||
./types,
|
||||
eth/[common, keys]
|
||||
|
|
|
@ -84,7 +84,6 @@ macro cliBuilder*(stmtList: typed): untyped =
|
|||
const names = `moduleNames`
|
||||
quit(executeMyself(`moduleCount`, names))
|
||||
else:
|
||||
disableParamFiltering()
|
||||
`caseStmt`
|
||||
|
||||
# if you want to add new test module(s)
|
||||
|
|
|
@ -327,7 +327,7 @@ proc runTester(tester: var Tester, chainDB: BaseChainDB, testStatusIMPL: var Tes
|
|||
|
||||
for idx, testBlock in tester.blocks:
|
||||
if testBlock.goodBlock:
|
||||
try:
|
||||
#try:
|
||||
let (preminedBlock, _, _) = tester.applyFixtureBlockToChain(
|
||||
testBlock, chainDB, checkSeal, validation = false)
|
||||
|
||||
|
@ -346,8 +346,8 @@ proc runTester(tester: var Tester, chainDB: BaseChainDB, testStatusIMPL: var Tes
|
|||
debugEcho "error message: ", res.error
|
||||
debugEcho "ttdReached: ", ttdReached
|
||||
|
||||
except:
|
||||
debugEcho "FATAL ERROR(WE HAVE BUG): ", getCurrentExceptionMsg()
|
||||
#except:
|
||||
#debugEcho "FATAL ERROR(WE HAVE BUG): ", getCurrentExceptionMsg()
|
||||
|
||||
else:
|
||||
var noError = true
|
||||
|
@ -537,7 +537,6 @@ when isMainModule:
|
|||
echo message
|
||||
quit(QuitSuccess)
|
||||
|
||||
disableParamFiltering()
|
||||
blockchainJsonMain(true)
|
||||
|
||||
# lastBlockHash -> every fixture has it, hash of a block header
|
||||
|
|
|
@ -255,5 +255,4 @@ when isMainModule:
|
|||
echo message
|
||||
quit(QuitSuccess)
|
||||
|
||||
disableParamFiltering()
|
||||
generalStateJsonMain(true)
|
||||
|
|
|
@ -107,7 +107,6 @@ proc graphqlMain*() =
|
|||
when isMainModule:
|
||||
ctx.main(caseFolder, purgeSchema = false)
|
||||
else:
|
||||
disableParamFiltering()
|
||||
ctx.executeCases(caseFolder, purgeSchema = false)
|
||||
|
||||
when isMainModule:
|
||||
|
|
Loading…
Reference in New Issue