Minimal changes required for building the LES branch

This commit is contained in:
Zahary Karadjov 2018-10-16 03:10:01 +03:00
parent 343cc4fa43
commit 41adca1abb
10 changed files with 13 additions and 34 deletions

View File

@ -1,22 +0,0 @@
# 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.
import
constants, errors, eth_common, rlp, eth_common/eth_types
type
Account* = object
nonce*: AccountNonce
balance*: UInt256
storageRoot*: Hash256
codeHash*: Hash256
proc newAccount*(nonce: AccountNonce = 0, balance: UInt256 = 0.u256): Account =
result.nonce = nonce
result.balance = balance
result.storageRoot = BLANK_ROOT_HASH
result.codeHash = EMPTY_SHA3

View File

@ -7,8 +7,9 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import parseopt, strutils, macros, os
import asyncdispatch2, eth_keys, eth_p2p, eth_common, chronicles
import
parseopt, strutils, macros, os,
asyncdispatch2, eth_keys, eth_p2p, eth_common, chronicles, nimcrypto/hash
const
NimbusName* = "Nimbus"

View File

@ -1,6 +1,5 @@
import
math, strutils, eth_common
math, strutils, eth_common, nimcrypto/hash
proc default(t: typedesc): t = discard

View File

@ -1,4 +1,4 @@
import os, rocksdb, ranges, eth_trie/[db_tracing, constants]
import os, rocksdb, ranges, eth_trie/[defs, db_tracing]
import ../storage_types
type

View File

@ -8,7 +8,7 @@
import
sequtils, strformat, tables,
chronicles, eth_common, nimcrypto, rlp, eth_trie/[hexary, db],
../constants, ../errors, ../validation, ../account
../constants, ../errors, ../validation
logScope:
topics = "state_db"

View File

@ -2,7 +2,7 @@ import
times, tables,
eth_common, stint, byteutils, rlp, ranges, block_types, nimcrypto,
chronicles, eth_trie, eth_trie/db,
db/[db_chain, state_db], genesis_alloc, config, account, constants
db/[db_chain, state_db], genesis_alloc, config, constants
type
Genesis* = object

View File

@ -10,7 +10,8 @@
import
os, strutils, net, eth_common, db/[storage_types, db_chain],
asyncdispatch2, json_rpc/rpcserver, eth_keys,
eth_p2p, eth_p2p/rlpx_protocols/[eth],
eth_p2p, eth_p2p/rlpx_protocols/[eth_protocol, les_protocol],
eth_p2p/blockchain_sync,
config, genesis, rpc/[common, p2p], p2p/chain,
eth_trie/db

View File

@ -8,7 +8,7 @@
# those terms.
import
strutils, times,
strutils, times, options,
nimcrypto, json_rpc/rpcserver, hexstrings, stint, byteutils, ranges/typedranges,
eth_common, eth_p2p, eth_keys, eth_trie/db, rlp,
../utils/header, ../transaction, ../config, ../vm_state, ../constants,

View File

@ -28,7 +28,7 @@ type
data*: EthHashStr # TODO: Support more data. The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI.
nonce*: int # (optional) integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce
EthCall* = object
EthCall* = object
# Parameter from user
source*: EthAddressStr # (optional) The address the transaction is send from.
to*: EthAddressStr # The address the transaction is directed to.

View File

@ -1,9 +1,9 @@
import
unittest, json, strformat, nimcrypto, rlp,
json_rpc/[rpcserver, rpcclient],
json_rpc/[rpcserver, rpcclient],
../nimbus/rpc/[common, p2p, hexstrings],
../nimbus/constants,
../nimbus/nimbus/[account, vm_state, config],
../nimbus/nimbus/[vm_state, config],
../nimbus/db/[state_db, db_chain], eth_common, byteutils,
eth_trie/[memDb, types],
eth_p2p, eth_keys