mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-10 06:57:24 +00:00
fix non-wrapped proto messages in statesync
This commit is contained in:
@@ -130,15 +130,16 @@ func (r *Reactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) {
|
||||
for _, snapshot := range snapshots {
|
||||
r.Logger.Debug("Advertising snapshot", "height", snapshot.Height,
|
||||
"format", snapshot.Format, "peer", src.ID())
|
||||
m := mustEncodeMsg()
|
||||
e := p2p.Envelope{
|
||||
ChannelID: chID,
|
||||
Message: &ssproto.SnapshotsResponse{
|
||||
Message: toWrappedProto(&ssproto.SnapshotsResponse{
|
||||
Height: snapshot.Height,
|
||||
Format: snapshot.Format,
|
||||
Chunks: snapshot.Chunks,
|
||||
Hash: snapshot.Hash,
|
||||
Metadata: snapshot.Metadata,
|
||||
},
|
||||
}),
|
||||
}
|
||||
src.Send(e)
|
||||
}
|
||||
|
||||
@@ -473,11 +473,11 @@ func (s *syncer) requestChunk(snapshot *snapshot, chunk uint32) {
|
||||
"format", snapshot.Format, "chunk", chunk, "peer", peer.ID())
|
||||
e := p2p.Envelope{
|
||||
ChannelID: ChunkChannel,
|
||||
Message: &ssproto.ChunkRequest{
|
||||
Message: toWrappedProto(&ssproto.ChunkRequest{
|
||||
Height: snapshot.Height,
|
||||
Format: snapshot.Format,
|
||||
Index: chunk,
|
||||
},
|
||||
}),
|
||||
}
|
||||
peer.Send(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user