diff --git a/nimbus/vm2/memory_defs.nim b/nimbus/vm2/memory_defs.nim new file mode 100644 index 000000000..14fe9e5d4 --- /dev/null +++ b/nimbus/vm2/memory_defs.nim @@ -0,0 +1,15 @@ +# Nimbus +# Copyright (c) 2018 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or +# http://www.apache.org/licenses/LICENSE-2.0) +# * MIT license ([LICENSE-MIT](LICENSE-MIT) or +# http://opensource.org/licenses/MIT) +# at your option. This file may not be copied, modified, or distributed except +# according to those terms. + +type + Memory* = ref object + bytes*: seq[byte] + +# End diff --git a/nimbus/vm2/v2computation.nim b/nimbus/vm2/v2computation.nim index 4af1c69e2..e05a89599 100644 --- a/nimbus/vm2/v2computation.nim +++ b/nimbus/vm2/v2computation.nim @@ -15,7 +15,7 @@ import sets, eth/[common, keys], ../constants, ../errors, ./interpreter/[v2opcode_values, gas_meter, v2gas_costs, v2forks], - ./code_stream, ./v2memory, ./v2message, ./stack, ./v2types, ./v2state, + ./code_stream, ./memory_defs, ./v2message, ./stack, ./v2types, ./v2state, ../db/[accounts_cache, db_chain], ../utils/header, ./v2precompiles, ./transaction_tracer, ../utils diff --git a/nimbus/vm2/v2memory.nim b/nimbus/vm2/v2memory.nim index 276d403b7..cdf835e76 100644 --- a/nimbus/vm2/v2memory.nim +++ b/nimbus/vm2/v2memory.nim @@ -13,16 +13,15 @@ when defined(evmc_enabled): import sequtils, chronicles, eth/common/eth_types, - ../errors, ../validation, + ../errors, ../validation, ./memory_defs, ./interpreter/utils/v2utils_numeric +export + Memory + logScope: topics = "vm memory" -type - Memory* = ref object - bytes*: seq[byte] - proc newMemory*: Memory = new(result) result.bytes = @[] diff --git a/nimbus/vm2/v2types.nim b/nimbus/vm2/v2types.nim index 4ccb60d9b..e030555b6 100644 --- a/nimbus/vm2/v2types.nim +++ b/nimbus/vm2/v2types.nim @@ -16,7 +16,7 @@ when defined(evmc_enabled): import tables, eth/common, options, json, sets, - ./v2memory, ./stack_defs, ./code_stream, + ./stack_defs, ./memory_defs, ./code_stream, ./interpreter/[v2gas_costs, v2opcode_values, v2forks], # TODO - will be hidden at a lower layer ../db/[db_chain, accounts_cache]