Răsfoiți Sursa

Fixed tests

obscuren 10 ani în urmă
părinte
comite
43454053b0
2 a modificat fișierele cu 3 adăugiri și 5 ștergeri
  1. 1 1
      core/block_cache_test.go
  2. 2 4
      rpc/responses_test.go

+ 1 - 1
core/block_cache_test.go

@@ -11,7 +11,7 @@ import (
 func newChain(size int) (chain []*types.Block) {
 	var parentHash common.Hash
 	for i := 0; i < size; i++ {
-		block := types.NewBlock(parentHash, common.Address{}, common.Hash{}, new(big.Int), 0, "")
+		block := types.NewBlock(parentHash, common.Address{}, common.Hash{}, new(big.Int), 0, nil)
 		block.Header().Number = big.NewInt(int64(i))
 		chain = append(chain, block)
 		parentHash = block.Hash()

+ 2 - 4
rpc/responses_test.go

@@ -31,8 +31,7 @@ func TestNewBlockRes(t *testing.T) {
 	root := common.HexToHash("0x01")
 	difficulty := common.Big1
 	nonce := uint64(1)
-	extra := ""
-	block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra)
+	block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, nil)
 	tests := map[string]string{
 		"number":           reNum,
 		"hash":             reHash,
@@ -81,8 +80,7 @@ func TestNewBlockResWithTrans(t *testing.T) {
 	root := common.HexToHash("0x01")
 	difficulty := common.Big1
 	nonce := uint64(1)
-	extra := ""
-	block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra)
+	block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, nil)
 	tests := map[string]string{
 		"number":           reNum,
 		"hash":             reHash,