defer os.RemoveAll("temp")
store := leveldb.NewStore(testDB)
- txPool := protocol.NewTxPool()
+ txPool := protocol.NewTxPool(store)
chain, err := protocol.NewChain(store, txPool)
if err != nil {
t.Fatal(err)
}
- xpub1, err := hsm.XCreate("test_pub1", "password")
+ xpub1, _, err := hsm.XCreate("test_pub1", "password", "en")
if err != nil {
t.Fatal(err)
}
- testAccount, err := accountManager.Create(nil, []chainkd.XPub{xpub1.XPub}, 1, "testAccount")
+ testAccount, err := accountManager.Create([]chainkd.XPub{xpub1.XPub}, 1, "testAccount")
if err != nil {
t.Fatal(err)
}
- controlProg, err := accountManager.CreateAddress(nil, testAccount.ID, false)
+ controlProg, err := accountManager.CreateAddress(testAccount.ID, false)
if err != nil {
t.Fatal(err)
}
controlProg.KeyIndex = 1
reg := asset.NewRegistry(testDB, chain)
- asset, err := reg.Define([]chainkd.XPub{xpub1.XPub}, 1, nil, "TESTASSET")
+ asset, err := reg.Define([]chainkd.XPub{xpub1.XPub}, 1, nil, "TESTASSET", nil)
if err != nil {
t.Fatal(err)
}
tx := types.NewTx(*txData)
block := mockSingleBlock(tx)
txStatus := bc.NewTransactionStatus()
+ txStatus.SetStatus(0, false)
store.SaveBlock(block, txStatus)
w := mockWallet(testDB, accountManager, reg, chain)