mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-05 19:35:48 +00:00
network: fix Ping messages
* NewPing() accepts block index first and nonce then. * Block height should be used, it'll be important for state exchanging nodes
This commit is contained in:
parent
38d14d4e3a
commit
c3175112fe
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,7 @@ func (s *Server) runProto() {
|
|||
if s.chain.BlockHeight() == prevHeight {
|
||||
// Get a copy of s.peers to avoid holding a lock while sending.
|
||||
for peer := range s.Peers() {
|
||||
_ = peer.SendPing(s.MkMsg(CMDPing, payload.NewPing(s.id, s.chain.HeaderHeight())))
|
||||
_ = peer.SendPing(s.MkMsg(CMDPing, payload.NewPing(s.chain.BlockHeight(), s.id)))
|
||||
}
|
||||
}
|
||||
pingTimer.Reset(s.PingInterval)
|
||||
|
|
Loading…
Reference in a new issue