mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Sentry handshake fix (?) and not overwriting statusData with zero block (#2355)
* Not overwrite statusData from txpool status * Report error when doing sentry handshake Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
parent
75ee5db06f
commit
336515124b
@ -229,6 +229,7 @@ func SentryHandshake(ctx context.Context, sentry remote.SentryClient, controlSer
|
||||
if s, ok := status.FromError(err); ok && s.Code() == codes.Canceled {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -846,7 +846,10 @@ func (ss *SentryServerImpl) SetStatus(_ context.Context, statusData *proto_sentr
|
||||
}
|
||||
}
|
||||
ss.P2pServer.LocalNode().Set(eth.CurrentENREntryFromForks(statusData.ForkData.Forks, genesisHash, statusData.MaxBlock))
|
||||
ss.statusData = statusData
|
||||
if ss.statusData == nil || statusData.MaxBlock != 0 {
|
||||
// Not overwrite statusData if the message contains zero MaxBlock (comes from standalone transaction pool)
|
||||
ss.statusData = statusData
|
||||
}
|
||||
return reply, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user