OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 14:59:57 +0000 (22:59 +0800)
committerChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 14:59:57 +0000 (22:59 +0800)
database/wallet_store.go
test/mock/wallet_store.go

index ff25b4d..2c711bd 100644 (file)
@@ -84,8 +84,6 @@ func Bip44ContractIndexKey(accountID string, change bool) []byte {
 
 // ContractKey account control promgram store prefix
 func ContractKey(hash bc.Hash) []byte {
-       // h := hash.String()
-       // return append([]byte(ContractPrefix), []byte(h)...)
        return append([]byte(ContractPrefix), hash.Bytes()...)
 }
 
@@ -96,15 +94,11 @@ func AccountIDKey(accountID string) []byte {
 
 // StandardUTXOKey makes an account unspent outputs key to store
 func StandardUTXOKey(id bc.Hash) []byte {
-       // name := id.String()
-       // return append(UTXOPrefix, []byte(name)...)
        return append(UTXOPrefix, id.Bytes()...)
 }
 
 // ContractUTXOKey makes a smart contract unspent outputs key to store
 func ContractUTXOKey(id bc.Hash) []byte {
-       // name := id.String()
-       // return append(SUTXOPrefix, []byte(name)...)
        return append(SUTXOPrefix, id.Bytes()...)
 }
 
@@ -364,7 +358,6 @@ func (store *WalletStore) GetWalletInfo() []byte {
 
 // ListAccountUTXOs get all account unspent outputs
 func (store *WalletStore) ListAccountUTXOs(key string) ([]*acc.UTXO, error) {
-       fmt.Println("ListAccountUTXOs []byte(key):", []byte(key))
        accountUtxoIter := store.walletDB.IteratorPrefix([]byte(key))
        defer accountUtxoIter.Release()
 
index c2b4b43..02ed353 100644 (file)
@@ -97,15 +97,11 @@ func AccountIDKey(accountID string) []byte {
 
 // StandardUTXOKey makes an account unspent outputs key to store
 func StandardUTXOKey(id bc.Hash) []byte {
-       // name := id.String()
-       // return append(UTXOPrefix, []byte(name)...)
        return append(UTXOPrefix, id.Bytes()...)
 }
 
 // ContractUTXOKey makes a smart contract unspent outputs key to store
 func ContractUTXOKey(id bc.Hash) []byte {
-       //      name := id.String()
-       //      return append(SUTXOPrefix, []byte(name)...)
        return append(SUTXOPrefix, id.Bytes()...)
 }