OSDN Git Service

reorganize error code (#1133)
[bytom/bytom-spv.git] / protocol / validation / block_test.go
index 5e2ad35..aac57d8 100644 (file)
@@ -72,12 +72,12 @@ func TestCheckCoinbaseAmount(t *testing.T) {
                                }),
                        },
                        amount: 6000,
-                       err:    errWrongCoinbaseTransaction,
+                       err:    ErrWrongCoinbaseTransaction,
                },
                {
                        txs:    []*types.Tx{},
                        amount: 5000,
-                       err:    errWrongCoinbaseTransaction,
+                       err:    ErrWrongCoinbaseTransaction,
                },
        }
 
@@ -95,6 +95,7 @@ func TestValidateBlockHeader(t *testing.T) {
        // real matrix calculate cost.
        tensority.AIHash.AddCache(&bc.Hash{V0: 0}, &bc.Hash{}, testutil.MaxHash)
        tensority.AIHash.AddCache(&bc.Hash{V0: 1}, &bc.Hash{}, testutil.MinHash)
+       tensority.AIHash.AddCache(&bc.Hash{V0: 1}, consensus.InitialSeed, testutil.MinHash)
 
        cases := []struct {
                block  *bc.Block