avoid use of shallow (#636)

this probably has some tiny overhead but it shouldn't practically matter
This commit is contained in:
Jacek Sieka 2023-09-20 09:24:24 +02:00 committed by GitHub
parent ac680ed79b
commit 02c8a1276b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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
type Neighbour = tuple[ip: IpAddress, udpPort, tcpPort: Port, pk: PublicKey]
var nodes = newSeqOfCap[Neighbour](MAX_NEIGHBOURS_PER_PACKET)
shallow(nodes)
template flush() =
block:

View File

@ -2,9 +2,9 @@
import
std/[json, os],
unittest2, stint,
unittest2,
chronos, stew/byteutils,
../../eth/[p2p, common],
../../eth/[p2p],
../stubloglevel,
./p2p_test_helper,
./eth_protocol