mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 12:54:13 +00:00
Sync: Switch other modules over to the eth/65
module
Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
parent
889a796b72
commit
00647b373c
@ -10,7 +10,7 @@
|
||||
import
|
||||
std/[os, parseopt, json],
|
||||
eth/[p2p, trie/db], ../../../nimbus/db/db_chain,
|
||||
eth/p2p/rlpx_protocols/eth_protocol,
|
||||
../../../nimbus/sync/protocol_eth65,
|
||||
../../../nimbus/[genesis, config, conf_utils],
|
||||
../../../nimbus/graphql/ethapi, ../../../tests/test_helpers,
|
||||
graphql, ../sim_utils
|
||||
|
@ -15,11 +15,13 @@ import
|
||||
eth/keys, db/[storage_types, db_chain, select_backend],
|
||||
eth/common as eth_common, eth/p2p as eth_p2p,
|
||||
chronos, json_rpc/rpcserver, chronicles,
|
||||
eth/p2p/rlpx_protocols/[eth_protocol, les_protocol],
|
||||
eth/p2p/rlpx_protocols/les_protocol,
|
||||
eth/p2p/blockchain_sync, eth/net/nat, eth/p2p/peer_pool,
|
||||
./sync/protocol_eth65,
|
||||
config, genesis, rpc/[common, p2p, debug, key_storage], p2p/chain,
|
||||
eth/trie/db, metrics, metrics/[chronos_httpserver, chronicles_support],
|
||||
graphql/ethapi, utils, ./conf_utils
|
||||
graphql/ethapi,
|
||||
"."/[utils, conf_utils]
|
||||
|
||||
## TODO:
|
||||
## * No IPv6 support
|
||||
|
@ -11,7 +11,7 @@ import
|
||||
strutils, times, options, tables,
|
||||
json_rpc/rpcserver, hexstrings, stint, stew/byteutils,
|
||||
eth/[common, keys, rlp, p2p], nimcrypto,
|
||||
eth/p2p/rlpx_protocols/eth_protocol,
|
||||
../sync/protocol_eth65,
|
||||
../transaction, ../config, ../vm_state, ../constants,
|
||||
../utils, ../db/[db_chain, state_db],
|
||||
rpc_types, rpc_utils,
|
||||
@ -38,7 +38,7 @@ proc setupEthRpc*(node: EthereumNode, chain: BaseChainDB , server: RpcServer) =
|
||||
result = getAccountDb(chain.headerFromTag(tag))
|
||||
|
||||
server.rpc("eth_protocolVersion") do() -> string:
|
||||
result = $eth_protocol.protocolVersion
|
||||
result = $protocol_eth65.protocolVersion
|
||||
|
||||
server.rpc("eth_syncing") do() -> JsonNode:
|
||||
## Returns SyncObject or false when not syncing.
|
||||
|
@ -11,8 +11,8 @@ import
|
||||
std/[os, json],
|
||||
stew/byteutils, unittest2,
|
||||
eth/[p2p, common, trie/db, rlp, trie],
|
||||
eth/p2p/rlpx_protocols/eth_protocol,
|
||||
graphql, ../nimbus/graphql/ethapi, graphql/test_common,
|
||||
../nimbus/sync/protocol_eth65,
|
||||
../nimbus/[genesis, config, chain_config], ../nimbus/db/[db_chain, state_db],
|
||||
../nimbus/p2p/chain, ../premix/parser, ./test_helpers
|
||||
|
||||
|
@ -9,12 +9,12 @@ import
|
||||
asynctest, json, strformat, strutils, options, tables, os,
|
||||
nimcrypto, stew/byteutils, times,
|
||||
json_rpc/[rpcserver, rpcclient], eth/common as eth_common,
|
||||
eth/[rlp, keys], eth/trie/db, eth/p2p/rlpx_protocols/eth_protocol,
|
||||
eth/p2p/private/p2p_types,
|
||||
eth/[rlp, keys, trie/db, p2p/private/p2p_types],
|
||||
../nimbus/rpc/[common, p2p, hexstrings, rpc_types, rpc_utils],
|
||||
../nimbus/[constants, vm_state, config, genesis, utils, transaction],
|
||||
../nimbus/db/[accounts_cache, db_chain, storage_types, state_db],
|
||||
../nimbus/p2p/[chain, executor, executor/executor_helpers],
|
||||
../nimbus/sync/protocol_eth65,
|
||||
../nimbus/utils/difficulty,
|
||||
./rpcclient/test_hexstrings, ./test_helpers, ./macro_assembler
|
||||
|
||||
@ -193,7 +193,7 @@ proc rpcMain*() =
|
||||
|
||||
test "eth_protocolVersion":
|
||||
let res = await client.eth_protocolVersion()
|
||||
check res == $eth_protocol.protocolVersion
|
||||
check res == $protocol_eth65.protocolVersion
|
||||
|
||||
test "eth_syncing":
|
||||
let res = await client.eth_syncing()
|
||||
|
Loading…
x
Reference in New Issue
Block a user