Skip to content

Commit

Permalink
Remove trie_defs imports (#2872)
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko authored Nov 25, 2024
1 parent 6e7e63a commit daaf0f2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion nimbus/common/common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import
chronicles,
eth/trie/trie_defs,
../core/casper,
../db/[core_db, ledger, storage_types],
../utils/[utils, ec_recover],
Expand Down
3 changes: 1 addition & 2 deletions tests/test_generalstate_json.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import
../tools/common/helpers as chp,
../tools/evmstate/helpers,
../tools/common/state_clearing,
eth/trie/trie_defs,
eth/common/transaction_utils,
unittest2,
stew/byteutils,
Expand Down Expand Up @@ -79,7 +78,7 @@ proc dumpDebugData(ctx: TestCtx, vmState: BaseVMState, gasUsed: GasInt, success:
proc testFixtureIndexes(ctx: var TestCtx, testStatusIMPL: var TestStatus) =
let
com = CommonRef.new(newCoreDbRef DefaultDbMemory, ctx.chainConfig)
parent = Header(stateRoot: emptyRlpHash)
parent = Header(stateRoot: emptyRoot)
tracer = if ctx.trace:
newLegacyTracer({})
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_getproof_json.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import
web3/eth_api,
nimcrypto/[keccak, hash],
eth/common/[keys, eth_types_rlp],
eth/[rlp, trie/trie_defs, trie/hexary_proof_verification],
eth/[rlp, trie/hexary_proof_verification],
../nimbus/db/[ledger, core_db],
../nimbus/common/chain_config,
../nimbus/rpc/server_api
Expand Down
1 change: 0 additions & 1 deletion tools/evmstate/evmstate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import
stew/byteutils,
results,
stint,
eth/trie/[trie_defs],
../../nimbus/[evm/types, evm/state],
../../nimbus/db/ledger,
../../nimbus/transaction,
Expand Down
5 changes: 2 additions & 3 deletions tools/evmstate/helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import
eth/common/keys,
eth/common/headers,
eth/common/transactions,
eth/trie/trie_defs,
stint,
stew/byteutils,
../../nimbus/transaction,
Expand Down Expand Up @@ -113,7 +112,7 @@ proc parseHeader*(n: JsonNode): Header =
number : required(BlockNumber, "currentNumber"),
gasLimit : required(GasInt, "currentGasLimit"),
timestamp : required(EthTime, "currentTimestamp"),
stateRoot : emptyRlpHash,
stateRoot : emptyRoot,
mixHash : omitZero(Bytes32, "currentRandom"),
baseFeePerGas : optional(UInt256, "currentBaseFee"),
withdrawalsRoot: optional(Hash32, "currentWithdrawalsRoot"),
Expand All @@ -123,7 +122,7 @@ proc parseHeader*(n: JsonNode): Header =

proc parseParentHeader*(n: JsonNode): Header =
Header(
stateRoot: emptyRlpHash,
stateRoot: emptyRoot,
excessBlobGas: optional(uint64, "parentExcessBlobGas"),
blobGasUsed: optional(uint64, "parentBlobGasUsed"),
)
Expand Down

0 comments on commit daaf0f2

Please sign in to comment.