Bump nim-eth for Opt changes and make Opt related adjustments (#6369)
This commit is contained in:
parent
cb2c379b37
commit
7a8c1d818a
|
@ -78,7 +78,7 @@ proc loadBootstrapFile*(bootstrapFile: string,
|
|||
|
||||
proc new*(T: type Eth2DiscoveryProtocol,
|
||||
config: BeaconNodeConf | LightClientConf,
|
||||
enrIp: Option[IpAddress], enrTcpPort, enrUdpPort: Option[Port],
|
||||
enrIp: Opt[IpAddress], enrTcpPort, enrUdpPort: Opt[Port],
|
||||
pk: PrivateKey,
|
||||
enrFields: openArray[(string, seq[byte])], rng: ref HmacDrbgContext):
|
||||
T =
|
||||
|
|
|
@ -1765,7 +1765,7 @@ proc new(T: type Eth2Node,
|
|||
enrForkId: ENRForkID, discoveryForkId: ENRForkID,
|
||||
forkDigests: ref ForkDigests, getBeaconTime: GetBeaconTimeFn,
|
||||
switch: Switch, pubsub: GossipSub,
|
||||
ip: Option[IpAddress], tcpPort, udpPort: Option[Port],
|
||||
ip: Opt[IpAddress], tcpPort, udpPort: Opt[Port],
|
||||
privKey: keys.PrivateKey, discovery: bool,
|
||||
directPeers: DirectPeers,
|
||||
rng: ref HmacDrbgContext): T {.raises: [CatchableError].} =
|
||||
|
|
|
@ -2271,9 +2271,9 @@ proc doRecord(config: BeaconNodeConf, rng: var HmacDrbgContext) {.
|
|||
let record = enr.Record.init(
|
||||
config.seqNumber,
|
||||
netKeys.seckey.asEthKey,
|
||||
some(config.ipExt),
|
||||
some(config.tcpPortExt),
|
||||
some(config.udpPortExt),
|
||||
Opt.some(config.ipExt),
|
||||
Opt.some(config.tcpPortExt),
|
||||
Opt.some(config.udpPortExt),
|
||||
fieldPairs).expect("Record within size limits")
|
||||
|
||||
echo record.toURI()
|
||||
|
|
|
@ -379,9 +379,9 @@ proc createEnr(rng: var HmacDrbgContext,
|
|||
bootstrapEnr = enr.Record.init(
|
||||
1, # sequence number
|
||||
networkKeys.seckey.asEthKey,
|
||||
some(address),
|
||||
some(port),
|
||||
some(port),
|
||||
Opt.some(address),
|
||||
Opt.some(port),
|
||||
Opt.some(port),
|
||||
[
|
||||
toFieldPair(enrForkIdField, forkId),
|
||||
toFieldPair(enrAttestationSubnetsField, SSZ.encode(netMetadata.attnets))
|
||||
|
|
|
@ -17,7 +17,7 @@ import
|
|||
|
||||
proc new(T: type Eth2DiscoveryProtocol,
|
||||
pk: keys.PrivateKey,
|
||||
enrIp: Option[IpAddress], enrTcpPort, enrUdpPort: Option[Port],
|
||||
enrIp: Opt[IpAddress], enrTcpPort, enrUdpPort: Opt[Port],
|
||||
bindPort: Port, bindIp: IpAddress,
|
||||
enrFields: openArray[(string, seq[byte])] = [],
|
||||
rng: ref HmacDrbgContext): T =
|
||||
|
@ -32,7 +32,7 @@ proc generateNode(rng: ref HmacDrbgContext, port: Port,
|
|||
except ValueError:
|
||||
raiseAssert "Argument is a valid IP address"
|
||||
Eth2DiscoveryProtocol.new(keys.PrivateKey.random(rng[]),
|
||||
some(ip), some(port), some(port), port, ip, enrFields, rng = rng)
|
||||
Opt.some(ip), Opt.some(port), Opt.some(port), port, ip, enrFields, rng = rng)
|
||||
|
||||
# TODO: Add tests with a syncnets preference
|
||||
const noSyncnetsPreference = SyncnetBits()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f169068df6c11a2aeba27584c60e354e19c42e94
|
||||
Subproject commit 26212c881b464ed64cac20442fb45144d3ecd3b3
|
Loading…
Reference in New Issue