OSDN Git Service

rename (#465)
[bytom/vapor.git] / test / performance / mining_test.go
index bd26fcd..22a8720 100644 (file)
@@ -3,11 +3,13 @@ package performance
 import (
        "os"
        "testing"
+       "time"
 
-       "github.com/vapor/account"
-       dbm "github.com/vapor/database/leveldb"
-       "github.com/vapor/mining"
-       "github.com/vapor/test"
+       "github.com/bytom/vapor/account"
+       "github.com/bytom/vapor/database"
+       dbm "github.com/bytom/vapor/database/leveldb"
+       "github.com/bytom/vapor/proposal"
+       "github.com/bytom/vapor/test"
 )
 
 // Function NewBlockTemplate's benchmark - 0.05s
@@ -19,10 +21,11 @@ func BenchmarkNewBlockTpl(b *testing.B) {
        if err != nil {
                b.Fatal(err)
        }
-       accountManager := account.NewManager(testDB, chain)
+       accountStore := database.NewAccountStore(testDB)
+       accountManager := account.NewManager(accountStore, chain)
 
        b.ResetTimer()
        for i := 0; i < b.N; i++ {
-               mining.NewBlockTemplate(chain, txPool, accountManager)
+               proposal.NewBlockTemplate(chain, txPool, accountManager, uint64(time.Now().UnixNano()/1e6))
        }
 }