瀏覽代碼

core: remove redundant parentheses (#19106)

Matthew Halpern 6 年之前
父節點
當前提交
bf42535d31
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      core/blockchain.go
  2. 1 1
      core/blockchain_test.go

+ 1 - 1
core/blockchain.go

@@ -456,7 +456,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
 		if block == nil {
 			return fmt.Errorf("missing block %d [%x]", (*head).NumberU64()-1, (*head).ParentHash())
 		}
-		(*head) = block
+		*head = block
 	}
 }
 

+ 1 - 1
core/blockchain_test.go

@@ -1412,7 +1412,7 @@ func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks in
 		}
 		b.StopTimer()
 		if got := chain.CurrentBlock().Transactions().Len(); got != numTxs*numBlocks {
-			b.Fatalf("Transactions were not included, expected %d, got %d", (numTxs * numBlocks), got)
+			b.Fatalf("Transactions were not included, expected %d, got %d", numTxs*numBlocks, got)
 
 		}
 	}