From e51bdbdc19cc4750f0cd070f4b84e1ca876ee8f2 Mon Sep 17 00:00:00 2001 From: Jacky Wang Date: Wed, 31 Mar 2021 13:46:41 -0700 Subject: [PATCH] [misc] resolved comments of TODOs --- consensus/consensus_v2.go | 2 +- node/node_handler.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/consensus/consensus_v2.go b/consensus/consensus_v2.go index d6229c589..f1c3c1ca5 100644 --- a/consensus/consensus_v2.go +++ b/consensus/consensus_v2.go @@ -711,7 +711,7 @@ func (consensus *Consensus) tryCatchup() error { return err } select { - // TODO(jacky): check if this is still needed. + // TODO: Remove this when removing dns sync and stream sync is fully up case consensus.VerifiedNewBlock <- blk: default: consensus.getLogger().Info(). diff --git a/node/node_handler.go b/node/node_handler.go index a7e73736e..514687c85 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -262,7 +262,6 @@ func (node *Node) VerifyNewBlock(newBlock *types.Block) error { if newBlock.NumberU64() <= node.Blockchain().CurrentBlock().NumberU64() { return errors.Errorf("block with the same block number is already committed: %d", newBlock.NumberU64()) } - // TODO(jacky): make sure this uses the cached result from last consensus (if any) if err := node.Blockchain().Validator().ValidateHeader(newBlock, true); err != nil { utils.Logger().Error(). Str("blockHash", newBlock.Hash().Hex()).