mirror of
https://github.com/status-im/nim-eth.git
synced 2025-02-20 17:58:20 +00:00
cleaning up imports and dependencies
This commit is contained in:
parent
c923a765d9
commit
6b6146e816
@ -558,8 +558,3 @@ proc decodePacket*(c: var Codec, fromAddr: Address, input: openArray[byte]):
|
||||
return decodeHandshakePacket(c, fromAddr, staticHeader.nonce,
|
||||
input.toOpenArray(0, ivSize - 1), header,
|
||||
input.toOpenArray(ivSize + header.len, input.high))
|
||||
|
||||
proc init*(T: type RequestId, rng: var BrHmacDrbgContext): T =
|
||||
var reqId = RequestId(id: newSeq[byte](8)) # RequestId must be <= 8 bytes
|
||||
brHmacDrbgGenerate(rng, reqId.id)
|
||||
reqId
|
||||
|
@ -15,7 +15,7 @@ import
|
||||
stew/shims/net, stew/[base64, results], nimcrypto,
|
||||
".."/../[rlp, keys]
|
||||
|
||||
export options, results, keys
|
||||
export options, results
|
||||
|
||||
const
|
||||
maxEnrSize = 300 ## Maximum size of an encoded node record, in bytes.
|
||||
|
@ -15,7 +15,8 @@
|
||||
import
|
||||
std/[hashes, net],
|
||||
stew/arrayops,
|
||||
../../rlp, ./enr
|
||||
".."/../[rlp, keys],
|
||||
./enr
|
||||
|
||||
type
|
||||
MessageKind* = enum
|
||||
@ -142,3 +143,8 @@ proc append*(writer: var RlpWriter, ip: IpAddress) =
|
||||
|
||||
proc hash*(reqId: RequestId): Hash =
|
||||
hash(reqId.id)
|
||||
|
||||
proc init*(T: type RequestId, rng: var BrHmacDrbgContext): T =
|
||||
var reqId = RequestId(id: newSeq[byte](8)) # RequestId must be <= 8 bytes
|
||||
brHmacDrbgGenerate(rng, reqId.id)
|
||||
reqId
|
||||
|
@ -1,8 +1,6 @@
|
||||
import
|
||||
std/[net],
|
||||
stint, bearssl, metrics,
|
||||
".."/../[rlp, keys],
|
||||
"."/[messages, node, enr]
|
||||
".."/../[rlp],
|
||||
"."/[messages, enr]
|
||||
|
||||
from stew/objects import checkedEnumAssign
|
||||
|
||||
|
@ -78,7 +78,7 @@ import
|
||||
stew/shims/net as stewNet, json_serialization/std/net,
|
||||
stew/[endians2, results], chronicles, chronos, stint, bearssl, metrics,
|
||||
".."/../[rlp, keys, async_utils],
|
||||
"."/[transport, messages, messages_encoding, encoding, node, routing_table, enr, random2, ip_vote, nodes_verification]
|
||||
"."/[transport, messages, messages_encoding, node, routing_table, enr, random2, ip_vote, nodes_verification]
|
||||
|
||||
import nimcrypto except toHex
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user