Golang implemented sidechain for Bytom
Revision | 7cc7f50fd6bc04f442e21ec9b1599a87f684dde5 (tree) |
---|---|
Zeit | 2020-02-25 09:43:36 |
Autor | ipqhjjybj <ipqhjjybj@qq.c...> |
Commiter | ipqhjjybj |
remore not use code
@@ -10,8 +10,6 @@ import ( | ||
10 | 10 | |
11 | 11 | "github.com/bytom/vapor/account" |
12 | 12 | "github.com/bytom/vapor/application/mov" |
13 | - "github.com/bytom/vapor/asset" | |
14 | - "github.com/bytom/vapor/blockchain/pseudohsm" | |
15 | 13 | "github.com/bytom/vapor/config" |
16 | 14 | cfg "github.com/bytom/vapor/config" |
17 | 15 | "github.com/bytom/vapor/consensus" |
@@ -25,7 +23,6 @@ import ( | ||
25 | 23 | "github.com/bytom/vapor/protocol/bc/types" |
26 | 24 | "github.com/bytom/vapor/protocol/state" |
27 | 25 | "github.com/bytom/vapor/testutil" |
28 | - w "github.com/bytom/vapor/wallet" | |
29 | 26 | ) |
30 | 27 | |
31 | 28 | const ( |
@@ -161,21 +158,9 @@ func TestRollback(t *testing.T) { | ||
161 | 158 | txPool := protocol.NewTxPool(store, []protocol.DustFilterer{movCore}, dispatcher) |
162 | 159 | chain, err := protocol.NewChain(store, txPool, []protocol.Protocoler{movCore}, dispatcher) |
163 | 160 | |
164 | - hsm, err := pseudohsm.New(cfg.CommonConfig.KeysDir()) | |
165 | 161 | walletDB := dbm.NewDB("wallet", cfg.CommonConfig.DBBackend, cfg.CommonConfig.DBDir()) |
166 | - walletStore := database.NewWalletStore(walletDB) | |
167 | 162 | accountStore := database.NewAccountStore(walletDB) |
168 | 163 | accounts := account.NewManager(accountStore, chain) |
169 | - assets := asset.NewRegistry(walletDB, chain) | |
170 | - wallet, err := w.NewWallet(walletStore, accounts, assets, hsm, chain, dispatcher, cfg.CommonConfig.Wallet.TxIndex) | |
171 | - if err != nil { | |
172 | - t.Fatal("init NewWallet") | |
173 | - } | |
174 | - | |
175 | - // trigger rescan wallet | |
176 | - if cfg.CommonConfig.Wallet.Rescan { | |
177 | - wallet.RescanBlocks() | |
178 | - } | |
179 | 164 | |
180 | 165 | cases := []struct { |
181 | 166 | desc string |