Skip to content

Commit

Permalink
fix(dpos2.0): use PingNOnce instead of lastPingNoce in writeLocalVers…
Browse files Browse the repository at this point in the history
…ionMsg
  • Loading branch information
RainFallsSilent committed Jul 19, 2022
1 parent 4abd53f commit 493c0c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpos/p2p/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ func (p *Peer) writeLocalVersionMsg() ([]byte, error) {
var nonce [16]byte
rand.Read(nonce[:])

if uint32(p.lastPingNonce) > p.cfg.DPoSV2StartHeight {
if uint32(p.cfg.PingNonce(p.pid)) > p.cfg.DPoSV2StartHeight {
if msg.GetPayloadVersion() < msg.DPoSV2Version {
msg.SetPayloadVersion(msg.DPoSV2Version)
}
Expand Down

0 comments on commit 493c0c4

Please sign in to comment.