OSDN Git Service

fix asset foreign key (#229)
[bytom/vapor.git] / test / bench_blockchain_test.go
index e691987..0d548fe 100644 (file)
@@ -18,7 +18,7 @@ import (
        dbm "github.com/vapor/database/leveldb"
        "github.com/vapor/database/storage"
        "github.com/vapor/event"
-       "github.com/vapor/mining"
+       "github.com/vapor/proposal"
        "github.com/vapor/protocol"
        "github.com/vapor/protocol/bc"
        "github.com/vapor/protocol/bc/types"
@@ -127,7 +127,7 @@ func GenerateChainData(dirPath string, testDB dbm.DB, txNumber, otherAssetNum in
 
        // init UtxoViewpoint
        utxoView := state.NewUtxoViewpoint()
-       utxoEntry := storage.NewUtxoEntry(false, 1, false)
+       utxoEntry := storage.NewUtxoEntry(storage.NormalUTXOType, 1, false)
        for _, tx := range txs {
                for _, id := range tx.SpentOutputIDs {
                        utxoView.Entries[id] = utxoEntry
@@ -159,7 +159,7 @@ func InsertChain(chain *protocol.Chain, txPool *protocol.TxPool, txs []*types.Tx
                }
        }
 
-       block, err := mining.NewBlockTemplate(chain, txPool, nil)
+       block, err := proposal.NewBlockTemplate(chain, txPool, nil, uint64(time.Now().UnixNano() / 1e6))
        if err != nil {
                return err
        }