From ea0de6e55e24aedc261c016b01caa0ceb92a0735 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Sun, 20 Oct 2024 21:52:33 -0500 Subject: [PATCH] adjust return data of fast sync so it doesn't return the earliest frame --- node/consensus/data/consensus_frames.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/consensus/data/consensus_frames.go b/node/consensus/data/consensus_frames.go index 5f1b510..60d303e 100644 --- a/node/consensus/data/consensus_frames.go +++ b/node/consensus/data/consensus_frames.go @@ -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 } }