Skip to content

Commit b92acf2

Browse files
committed
fix rebase conflict
1 parent 79425e5 commit b92acf2

File tree

4 files changed

+7
-33
lines changed

4 files changed

+7
-33
lines changed

nimbus/db/accounts_cache.nim

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010

1111
import
1212
std/[tables, hashes, sets],
13-
eth/[common, rlp], eth/trie/[hexary, db, trie_defs],
14-
../constants, ../utils/[utils, eof], storage_types,
13+
eth/[common, rlp],
14+
../constants, ../utils/[utils, eof],
1515
../../stateless/multi_keys,
16-
../constants,
17-
../utils/utils,
1816
./access_list as ac_access_list,
1917
"."/[core_db, distinct_tries, storage_types, transient_storage]
2018

@@ -384,9 +382,9 @@ proc loadCode(acc: RefAccount, ac: AccountsCache) =
384382
return
385383

386384
when defined(geth):
387-
let data = ac.db.get(acc.account.codeHash.data)
385+
let data = ac.kvt.get(acc.account.codeHash.data)
388386
else:
389-
let data = ac.db.get(contractHashKey(acc.account.codeHash).toOpenArray)
387+
let data = ac.kvt.get(contractHashKey(acc.account.codeHash).toOpenArray)
390388

391389
acc.code = data
392390
acc.flags.incl CodeLoaded
@@ -395,10 +393,6 @@ proc getCode*(ac: AccountsCache, address: EthAddress): seq[byte] =
395393
let acc = ac.getAccount(address, false)
396394
if acc.isNil:
397395
return
398-
<<<<<<< HEAD
399-
acc.loadCode(ac)
400-
acc.code
401-
=======
402396

403397
if CodeLoaded in acc.flags or CodeChanged in acc.flags:
404398
result = acc.code
@@ -411,7 +405,6 @@ proc getCode*(ac: AccountsCache, address: EthAddress): seq[byte] =
411405
acc.code = data
412406
acc.flags.incl CodeLoaded
413407
result = acc.code
414-
>>>>>>> master
415408

416409
proc getCodeSize*(ac: AccountsCache, address: EthAddress): int {.inline.} =
417410
let acc = ac.getAccount(address, false)

nimbus/evm/computation.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import
1212
".."/[db/accounts_cache, constants],
1313
"."/[code_stream, memory, message, stack, state],
14-
"."/[transaction_tracer, types, validate],
14+
"."/[types, validate],
1515
./interpreter/[gas_meter, gas_costs, op_codes],
1616
../common/[common, evmforks],
1717
../utils/[utils, eof],

nimbus/evm/types.nim

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,6 @@ type
5757
minerAddress* : EthAddress
5858
asyncFactory* : AsyncOperationFactory
5959

60-
<<<<<<< HEAD
61-
TracerFlags* {.pure.} = enum
62-
EnableTracing
63-
DisableStorage
64-
DisableMemory
65-
DisableStack
66-
DisableState
67-
DisableStateDiff
68-
EnableAccount
69-
DisableReturnData
70-
GethCompatibility
71-
72-
TransactionTracer* = object
73-
trace*: JsonNode
74-
flags*: set[TracerFlags]
75-
accounts*: HashSet[EthAddress]
76-
storageKeys*: seq[HashSet[UInt256]]
77-
gasUsed*: GasInt
78-
7960
# EIP-4750
8061
ReturnContext* = object
8162
section*: int

tests/test_eof.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ proc initEnv(): TestEnv =
230230

231231
let
232232
com = CommonRef.new(
233-
newMemoryDb(),
233+
newCoreDbRef LegacyDbMemory,
234234
conf.pruneMode == PruneMode.Full,
235235
conf.networkId,
236236
conf.networkParams
@@ -315,7 +315,7 @@ proc eofMain*() =
315315

316316
test "check flags and various deployment mechanisms":
317317
var state = AccountsCache.init(
318-
com.db.db,
318+
com.db,
319319
stateRoot,
320320
com.pruneTrie)
321321

0 commit comments

Comments
 (0)