package wallet
import (
- "encoding/hex"
"encoding/json"
- "fmt"
"io/ioutil"
"os"
"reflect"
"github.com/vapor/config"
"github.com/vapor/consensus"
vcrypto "github.com/vapor/crypto"
- edchainkd "github.com/vapor/crypto/ed25519/chainkd"
"github.com/vapor/database"
dbm "github.com/vapor/database/leveldb"
"github.com/vapor/event"
if err != nil {
t.Fatal(err)
}
- fmt.Println("TestMemPoolTxQueryLoop xpub1 is:", xpub1)
- edXPub := edchainkd.XPub{}
- edXPubKey, _ := hex.DecodeString("e0072a38408cfe4b70d322f8ed2d8acecab41615d2f091ddcd0d0622a8003de915569bd3e316d7e3c44ebebd21bfcc84f6428e60dbf17bef34f2e04a62f6cd2b")
- copy(edXPub[:], edXPubKey[:])
- xpub2 := pseudohsm.XPub{
- Alias: "",
- XPub: edXPub,
- File: "",
- }
xpubers := make([]vcrypto.XPubKeyer, 1)
- xpubers[0] = xpub2.XPub
+ xpubers[0] = xpub1.XPub
testAccount, err := accountManager.Create(xpubers, 1, "testAccount", signers.BIP0044)
if err != nil {
t.Fatal(err)
}
- fmt.Println("TestMemPoolTxQueryLoop testAccount is:", testAccount)
- fmt.Println("TestMemPoolTxQueryLoop testAccount xpubs is:", testAccount.XPubs[0])
- fmt.Println("TestMemPoolTxQueryLoop testAccount xpubs type is:", reflect.TypeOf(testAccount.XPubs[0]))
controlProg, err := accountManager.CreateAddress(testAccount.ID, false)
if err != nil {