From 3395affe75fb3a6578e5b0de89034215dd3e5a27 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Wed, 11 May 2022 13:07:41 +0200 Subject: [PATCH] blocksync: fixed merge induced error --- internal/blocksync/reactor.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/blocksync/reactor.go b/internal/blocksync/reactor.go index e752ce70c..e02725637 100644 --- a/internal/blocksync/reactor.go +++ b/internal/blocksync/reactor.go @@ -553,9 +553,8 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh // // first.Hash() doesn't verify the tx contents, so MakePartSet() is // // currently necessary. // err = state.Validators.VerifyCommitLight(chainID, firstID, first.Height, second.LastCommit) - - r.lastTrustedBlock = &BlockResponse{block: newBlock, commit: verifyBlock.LastCommit} - + r.lastTrustedBlock.block = newBlock + r.lastTrustedBlock.commit = verifyBlock.LastCommit } else { // we need to load the last block we trusted if r.initialState.LastBlockHeight != 0 { @@ -581,8 +580,7 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh continue // was return previously } - r.lastTrustedBlock.block = newBlock - // r.lastTrustedBlock.commit + r.lastTrustedBlock = &BlockResponse{block: newBlock, commit: verifyBlock.LastCommit} } var err error // validate the block before we persist it