mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
Send Announcement instead of ping in case blockchain info was not refreshed within a certain threshold. This helps to keep the global blockchain cache active, with no additional overhead. Close #78
This commit is contained in:
@@ -110,7 +110,8 @@ func DecodeResponse(msg *MessageRaw) (result *MessageResponse, err error) {
|
||||
read += 6
|
||||
|
||||
if countPeerResponses == 0 && countEmbeddedFiles == 0 && countHashesNotFound == 0 {
|
||||
return nil, errors.New("response: empty")
|
||||
// Empty responses are allowed. They can be useful as quasi-pings to get the latest blockchain info of the peer.
|
||||
return
|
||||
}
|
||||
|
||||
data := msg.Payload[read:]
|
||||
|
||||
Reference in New Issue
Block a user