mirror of https://github.com/status-im/nim-eth.git
avoid use of shallow (#636)
this probably has some tiny overhead but it shouldn't practically matter
This commit is contained in:
parent
ac680ed79b
commit
02c8a1276b
|
@ -132,7 +132,6 @@ proc sendNeighbours*(d: DiscoveryProtocol, node: Node, neighbours: seq[Node]) =
|
||||||
const MAX_NEIGHBOURS_PER_PACKET = 12 # TODO: Implement a smarter way to compute it
|
const MAX_NEIGHBOURS_PER_PACKET = 12 # TODO: Implement a smarter way to compute it
|
||||||
type Neighbour = tuple[ip: IpAddress, udpPort, tcpPort: Port, pk: PublicKey]
|
type Neighbour = tuple[ip: IpAddress, udpPort, tcpPort: Port, pk: PublicKey]
|
||||||
var nodes = newSeqOfCap[Neighbour](MAX_NEIGHBOURS_PER_PACKET)
|
var nodes = newSeqOfCap[Neighbour](MAX_NEIGHBOURS_PER_PACKET)
|
||||||
shallow(nodes)
|
|
||||||
|
|
||||||
template flush() =
|
template flush() =
|
||||||
block:
|
block:
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[json, os],
|
std/[json, os],
|
||||||
unittest2, stint,
|
unittest2,
|
||||||
chronos, stew/byteutils,
|
chronos, stew/byteutils,
|
||||||
../../eth/[p2p, common],
|
../../eth/[p2p],
|
||||||
../stubloglevel,
|
../stubloglevel,
|
||||||
./p2p_test_helper,
|
./p2p_test_helper,
|
||||||
./eth_protocol
|
./eth_protocol
|
||||||
|
|
Loading…
Reference in New Issue