@@ -280,7 +280,7 @@ func (p *PortalProtocol) RoutingTableInfo() [][]string {
280
280
}
281
281
282
282
func (p * PortalProtocol ) AddEnr (n * enode.Node ) {
283
- added := p .table .AddInboundNode ( n )
283
+ added := p .table .AddFoundNode ( n , true )
284
284
if ! added {
285
285
p .Log .Warn ("add node failed" , "id" , n .ID (), "ip" , n .IPAddr ())
286
286
return
@@ -315,11 +315,10 @@ func (p *PortalProtocol) setupDiscV5AndTable() error {
315
315
}
316
316
317
317
cfg := discover.Config {
318
- PrivateKey : p .PrivateKey ,
319
- NetRestrict : p .NetRestrict ,
320
- Bootnodes : p .BootstrapNodes ,
321
- Log : p .Log ,
322
- NoFindnodeLivenessCheck : true ,
318
+ PrivateKey : p .PrivateKey ,
319
+ NetRestrict : p .NetRestrict ,
320
+ Bootnodes : p .BootstrapNodes ,
321
+ Log : p .Log ,
323
322
}
324
323
325
324
p .table , err = discover .NewTable (p , p .localNode .Database (), cfg )
@@ -971,7 +970,9 @@ func (p *PortalProtocol) handleFindNodes(fromAddr *net.UDPAddr, request *FindNod
971
970
enrs := p .truncateNodes (nodes , maxPayloadSize , enrOverhead )
972
971
973
972
nodesMsg := & Nodes {
974
- Total : uint8 (len (enrs )),
973
+ // https://github.com/ethereum/portal-network-specs/blob/master/portal-wire-protocol.md
974
+ // total: The total number of Nodes response messages being sent. Currently fixed to only 1 response message.
975
+ Total : 1 ,
975
976
Enrs : enrs ,
976
977
}
977
978
0 commit comments