forked from TrueCloudLab/neoneo-go
network: remove wrong ping condition
In reality it will never be true exactly in the case where we want this ping mechanism to work --- when the node failed to get a block from the net. It won't get the header either and thus its block height will be equal to header height. The only moment when this condition is met is when the node does initial synchronization and this synchronization works just fine without any pings. Relates to #430.
This commit is contained in:
parent
247cfa4165
commit
a8252ecc05
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@ func (p *TCPPeer) StartProtocol() {
|
|||
// Try to sync in headers and block with the peer if his block height is higher then ours.
|
||||
if p.LastBlockIndex() > p.server.chain.BlockHeight() {
|
||||
err = p.server.requestBlocks(p)
|
||||
} else if p.server.chain.HeaderHeight() >= p.LastBlockIndex() {
|
||||
} else {
|
||||
block, errGetBlock := p.server.chain.GetBlock(p.server.chain.CurrentBlockHash())
|
||||
if errGetBlock != nil {
|
||||
err = errGetBlock
|
||||
|
|
Loading…
Reference in a new issue