OSDN Git Service

modify config (#265)
[bytom/vapor.git] / test / performance / mining_test.go
index bd26fcd..0f3f0d6 100644 (file)
@@ -3,10 +3,12 @@ package performance
 import (
        "os"
        "testing"
+       "time"
 
        "github.com/vapor/account"
+       "github.com/vapor/database"
        dbm "github.com/vapor/database/leveldb"
-       "github.com/vapor/mining"
+       "github.com/vapor/proposal"
        "github.com/vapor/test"
 )
 
@@ -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))
        }
 }