Fix 'version' message exhanging
This commit is contained in:
parent
3cb93b5278
commit
9de40a9385
|
@ -335,7 +335,7 @@ func handleVersion(request []byte, bc *Blockchain) {
|
||||||
|
|
||||||
if myBestHeight < foreignerBestHeight {
|
if myBestHeight < foreignerBestHeight {
|
||||||
sendGetBlocks(payload.AddrFrom)
|
sendGetBlocks(payload.AddrFrom)
|
||||||
} else {
|
} else if myBestHeight > foreignerBestHeight {
|
||||||
sendVersion(payload.AddrFrom, bc)
|
sendVersion(payload.AddrFrom, bc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue