OSDN Git Service

fix functional tests
[bytom/bytom.git] / test / protocol_test.go
index 7029e8a..b6f5a47 100644 (file)
@@ -8,6 +8,7 @@ import (
 
        dbm "github.com/tendermint/tmlibs/db"
 
+       "github.com/bytom/consensus"
        "github.com/bytom/protocol/bc/types"
        "github.com/bytom/protocol/vm"
 )
@@ -107,7 +108,7 @@ func TestDoubleSpentInDiffBlock(t *testing.T) {
        if err != nil {
                t.Fatal(err)
        }
-       if err := AppendBlocks(chain, 6); err != nil {
+       if err := AppendBlocks(chain, consensus.CoinbasePendingBlockNumber+1); err != nil {
                t.Fatal(err)
        }
 
@@ -149,7 +150,7 @@ func TestDoubleSpentInSameBlock(t *testing.T) {
        if err != nil {
                t.Fatal(err)
        }
-       if err := AppendBlocks(chain, 7); err != nil {
+       if err := AppendBlocks(chain, consensus.CoinbasePendingBlockNumber+1); err != nil {
                t.Fatal(err)
        }
 
@@ -202,7 +203,7 @@ func TestTxPoolDependencyTx(t *testing.T) {
        if err != nil {
                t.Fatal(err)
        }
-       if err := AppendBlocks(chain, 7); err != nil {
+       if err := AppendBlocks(chain, consensus.CoinbasePendingBlockNumber+1); err != nil {
                t.Fatal(err)
        }
 
@@ -257,7 +258,7 @@ func TestAddInvalidTxToTxPool(t *testing.T) {
                t.Fatal(err)
        }
 
-       if err := AppendBlocks(chain, 7); err != nil {
+       if err := AppendBlocks(chain, consensus.CoinbasePendingBlockNumber+1); err != nil {
                t.Fatal(err)
        }