• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revision3812da2ba558ae4306d8c614a0c64f9081f32126 (tree)
Time2019-06-19 22:54:19
AuthorChengcheng Zhang <943420582@qq.c...>
CommiterChengcheng Zhang

Log Message

update

Change Summary

Incremental Difference

--- a/wallet/recovery_test.go
+++ b/wallet/recovery_test.go
@@ -16,7 +16,7 @@ import (
1616 "github.com/vapor/common"
1717 "github.com/vapor/consensus"
1818 "github.com/vapor/crypto/ed25519/chainkd"
19- dbm "github.com/vapor/database/leveldb"
19+ "github.com/vapor/database"
2020 "github.com/vapor/errors"
2121 "github.com/vapor/protocol/bc"
2222 "github.com/vapor/protocol/bc/types"
@@ -135,7 +135,7 @@ func TestXPubsRecoveryLock(t *testing.T) {
135135 }
136136 defer os.RemoveAll(dirPath)
137137
138- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
138+ testDB := database.NewDB("testdb", "leveldb", dirPath)
139139 hsm, err := pseudohsm.New(dirPath)
140140 if err != nil {
141141 t.Fatal(err)
@@ -184,7 +184,7 @@ func TestExtendScanAddresses(t *testing.T) {
184184 }
185185 defer os.RemoveAll(dirPath)
186186
187- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
187+ testDB := database.NewDB("testdb", "leveldb", dirPath)
188188 hsm, err := pseudohsm.New(dirPath)
189189 if err != nil {
190190 t.Fatal(err)
@@ -239,8 +239,8 @@ func TestRecoveryFromXPubs(t *testing.T) {
239239 }
240240 defer os.RemoveAll(dirPath)
241241
242- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
243- recoveryDB := dbm.NewDB("recdb", "leveldb", dirPath)
242+ testDB := database.NewDB("testdb", "leveldb", dirPath)
243+ recoveryDB := database.NewDB("recdb", "leveldb", dirPath)
244244 hsm, err := pseudohsm.New(dirPath)
245245 if err != nil {
246246 t.Fatal(err)
@@ -313,8 +313,8 @@ func TestRecoveryByRescanAccount(t *testing.T) {
313313 }
314314 defer os.RemoveAll(dirPath)
315315
316- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
317- recoveryDB := dbm.NewDB("recdb", "leveldb", dirPath)
316+ testDB := database.NewDB("testdb", "leveldb", dirPath)
317+ recoveryDB := database.NewDB("recdb", "leveldb", dirPath)
318318 hsm, err := pseudohsm.New(dirPath)
319319 if err != nil {
320320 t.Fatal(err)
@@ -402,7 +402,7 @@ func TestReportFound(t *testing.T) {
402402 }
403403 defer os.RemoveAll(dirPath)
404404
405- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
405+ testDB := database.NewDB("testdb", "leveldb", dirPath)
406406 hsm, err := pseudohsm.New(dirPath)
407407 if err != nil {
408408 t.Fatal(err)
@@ -489,7 +489,7 @@ func TestLoadStatusInfo(t *testing.T) {
489489 }
490490 defer os.RemoveAll(dirPath)
491491
492- testDB := dbm.NewDB("testdb", "leveldb", "temp")
492+ testDB := database.NewDB("testdb", "leveldb", "temp")
493493 defer os.RemoveAll("temp")
494494
495495 hsm, err := pseudohsm.New(dirPath)
@@ -563,7 +563,7 @@ func TestLock(t *testing.T) {
563563 }
564564 defer os.RemoveAll(dirPath)
565565
566- testDB := dbm.NewDB("testdb", "leveldb", "temp")
566+ testDB := database.NewDB("testdb", "leveldb", "temp")
567567 defer os.RemoveAll("temp")
568568
569569 acctMgr := account.NewManager(testDB, nil)
@@ -621,7 +621,7 @@ func TestContractIndexResidue(t *testing.T) {
621621 }
622622 defer os.RemoveAll(dirPath)
623623
624- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
624+ testDB := database.NewDB("testdb", "leveldb", dirPath)
625625 hsm, err := pseudohsm.New(dirPath)
626626 if err != nil {
627627 t.Fatal(err)
--- a/wallet/unconfirmed_test.go
+++ b/wallet/unconfirmed_test.go
@@ -12,7 +12,7 @@ import (
1212 "github.com/vapor/blockchain/signers"
1313 "github.com/vapor/consensus"
1414 "github.com/vapor/crypto/ed25519/chainkd"
15- dbm "github.com/vapor/database/leveldb"
15+ "github.com/vapor/database"
1616 "github.com/vapor/event"
1717 "github.com/vapor/protocol/bc"
1818 "github.com/vapor/protocol/bc/types"
@@ -26,7 +26,7 @@ func TestWalletUnconfirmedTxs(t *testing.T) {
2626 }
2727 defer os.RemoveAll(dirPath)
2828
29- testDB := dbm.NewDB("testdb", "leveldb", "temp")
29+ testDB := database.NewDB("testdb", "leveldb", "temp")
3030 defer os.RemoveAll("temp")
3131
3232 accountManager := account.NewManager(testDB, nil)
--- a/wallet/utxo_test.go
+++ b/wallet/utxo_test.go
@@ -10,14 +10,14 @@ import (
1010
1111 "github.com/vapor/account"
1212 "github.com/vapor/consensus"
13- dbm "github.com/vapor/database/leveldb"
13+ "github.com/vapor/database"
1414 "github.com/vapor/protocol/bc"
1515 "github.com/vapor/protocol/bc/types"
1616 "github.com/vapor/testutil"
1717 )
1818
1919 func TestGetAccountUtxos(t *testing.T) {
20- testDB := dbm.NewDB("testdb", "leveldb", "temp")
20+ testDB := database.NewDB("testdb", "leveldb", "temp")
2121 defer func() {
2222 testDB.Close()
2323 os.RemoveAll("temp")
@@ -209,7 +209,7 @@ func TestGetAccountUtxos(t *testing.T) {
209209 }
210210
211211 func TestFilterAccountUtxo(t *testing.T) {
212- testDB := dbm.NewDB("testdb", "leveldb", "temp")
212+ testDB := database.NewDB("testdb", "leveldb", "temp")
213213 defer func() {
214214 testDB.Close()
215215 os.RemoveAll("temp")
--- a/wallet/wallet_test.go
+++ b/wallet/wallet_test.go
@@ -18,7 +18,6 @@ import (
1818 "github.com/vapor/crypto/ed25519/chainkd"
1919 "github.com/vapor/database"
2020 "github.com/vapor/database/dbutils"
21- dbm "github.com/vapor/database/leveldb"
2221 "github.com/vapor/event"
2322 "github.com/vapor/protocol"
2423 "github.com/vapor/protocol/bc"
@@ -118,7 +117,7 @@ func TestWalletUpdate(t *testing.T) {
118117 defer os.RemoveAll(dirPath)
119118
120119 config.CommonConfig = config.DefaultConfig()
121- testDB := dbm.NewDB("testdb", "leveldb", "temp")
120+ testDB := database.NewDB("testdb", "leveldb", "temp")
122121 defer func() {
123122 testDB.Close()
124123 os.RemoveAll("temp")
@@ -215,7 +214,7 @@ func TestRescanWallet(t *testing.T) {
215214 defer os.RemoveAll(dirPath)
216215
217216 config.CommonConfig = config.DefaultConfig()
218- testDB := dbm.NewDB("testdb", "leveldb", "temp")
217+ testDB := database.NewDB("testdb", "leveldb", "temp")
219218 defer func() {
220219 testDB.Close()
221220 os.RemoveAll("temp")
@@ -266,7 +265,7 @@ func TestMemPoolTxQueryLoop(t *testing.T) {
266265 t.Fatal(err)
267266 }
268267 config.CommonConfig = config.DefaultConfig()
269- testDB := dbm.NewDB("testdb", "leveldb", dirPath)
268+ testDB := database.NewDB("testdb", "leveldb", dirPath)
270269 defer func() {
271270 testDB.Close()
272271 os.RemoveAll(dirPath)
Show on old repository browser