mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
fix nil pointer on error
This commit is contained in:
parent
a3431f5663
commit
c8a357c673
@ -101,9 +101,9 @@ func (f *Send) BroadcastLocalPooledTxs(txs Hashes) (sentToPeers int) {
|
||||
peers, err := sentryClient.SendMessageToAll(f.ctx, req65, &grpc.EmptyCallOption{})
|
||||
if err != nil {
|
||||
log.Warn("[txpool.send] BroadcastLocalPooledTxs", "err", err)
|
||||
} else {
|
||||
avgPeersPerSent65 += len(peers.Peers)
|
||||
}
|
||||
avgPeersPerSent65 += len(peers.Peers)
|
||||
|
||||
case direct.ETH66:
|
||||
if req66 == nil {
|
||||
req66 = &sentry.OutboundMessageData{
|
||||
@ -114,8 +114,9 @@ func (f *Send) BroadcastLocalPooledTxs(txs Hashes) (sentToPeers int) {
|
||||
peers, err := sentryClient.SendMessageToAll(f.ctx, req66, &grpc.EmptyCallOption{})
|
||||
if err != nil {
|
||||
log.Warn("[txpool.send] BroadcastLocalPooledTxs", "err", err)
|
||||
} else {
|
||||
avgPeersPerSent66 += len(peers.Peers)
|
||||
}
|
||||
avgPeersPerSent66 += len(peers.Peers)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user