// Ask a peer if our latest block height is far too out-of-sync.
Ask a peer if our latest block height is far too out-of-sync.
// Ask a peer if our latest block height is far too out - of - sync .
func (s *SyncManager) askIfWereOutOfSync(ctx context.Context, peer skademlia.ClosestPeer, height uint64) (bool, error) {
	res, err := NewWaveletClient(peer.Conn()).CheckOutOfSync(ctx, &OutOfSyncRequest{BlockIndex: height})
	if err != nil {
		return false, errors.Wrap(err, "failed to ask peer if they believe we are out-of-sync")
	}
	return res.OutOfSync, nil
}
func ( s * SyncManager ) askIfWereOutOfSync ( ctx context . Context , peer skademlia . ClosestPeer , height uint64 ) ( bool , error ) { res , err := NewWaveletClient ( peer . Conn ( ) ) . CheckOutOfSync ( ctx , & OutOfSyncRequest { BlockIndex : height } ) if err != nil { return false , errors . Wrap ( err , " " ) } return res . OutOfSync , nil }
Ask a peer if our latest block height is far too out-of-sync.
Ask a peer if our latest block height is far too out - of - sync .