adjust return data of fast sync so it doesn't return the earliest frame

This commit is contained in:
Cassandra Heart 2024-10-20 21:52:33 -05:00
parent 2ca8491f76
commit ea0de6e55e
No known key found for this signature in database
GPG Key ID: 6352152859385958

View File

@ -233,7 +233,7 @@ func (e *DataClockConsensusEngine) sync(
response, err := client.GetDataFrame(
context.TODO(),
&protobufs.GetDataFrameRequest{
FrameNumber: currentLatest.FrameNumber + 1,
FrameNumber: latest.FrameNumber + 1,
},
grpc.MaxCallRecvMsgSize(600*1024*1024),
)
@ -287,9 +287,9 @@ func (e *DataClockConsensusEngine) sync(
}
e.dataTimeReel.Insert(response.ClockFrame, false)
currentLatest = response.ClockFrame
latest = response.ClockFrame
if currentLatest.FrameNumber >= maxFrame {
if latest.FrameNumber >= maxFrame {
break
}
}