blocksync: Return error without also logging it

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
Thane Thomson
2022-05-04 13:46:22 -04:00
parent a8adf63287
commit 86f942ac0f

View File

@@ -188,8 +188,7 @@ func (r *Reactor) respondToPeer(ctx context.Context, msg *bcproto.BlockRequest,
if block != nil {
extCommit := r.store.LoadBlockExtCommit(msg.Height)
if extCommit == nil {
r.logger.Error("peer requesting a block; we have the block but not its extended commit (%v)", block)
return fmt.Errorf("blockstore has block but not extended commit %v", block)
return fmt.Errorf("blockstore has block but not extended commit (block: %v)", block)
}
blockProto, err := block.ToProto()
if err != nil {