OSDN Git Service

remove GetAccount
authorChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 14:10:20 +0000 (22:10 +0800)
committerChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 14:10:20 +0000 (22:10 +0800)
database/wallet_store.go
wallet/store.go

index eb4ee67..6efd0a2 100644 (file)
@@ -281,19 +281,6 @@ func (store *WalletStore) DeleteWalletUTXOs() {
        }
 }
 
-// GetAccount get account value by account ID
-func (store *WalletStore) GetAccount(accountID string) (*acc.Account, error) {
-       rawAccount := store.walletDB.Get(AccountIDKey(accountID))
-       if rawAccount == nil {
-               return nil, fmt.Errorf("failed get account, accountID: %s ", accountID)
-       }
-       account := new(acc.Account)
-       if err := json.Unmarshal(rawAccount, account); err != nil {
-               return nil, err
-       }
-       return account, nil
-}
-
 // GetAsset get asset by assetID
 func (store *WalletStore) GetAsset(assetID *bc.AssetID) (*asset.Asset, error) {
        definitionByte := store.walletDB.Get(asset.ExtAssetKey(assetID))
index 0349b80..7d9b05b 100644 (file)
@@ -18,7 +18,6 @@ type WalletStore interface {
        DeleteUnconfirmedTransaction(string)
        DeleteWalletTransactions()
        DeleteWalletUTXOs()
-       GetAccount(string) (*acc.Account, error)
        GetAsset(*bc.AssetID) (*asset.Asset, error)
        GetControlProgram(bc.Hash) (*acc.CtrlProgram, error)
        GetGlobalTransactionIndex(string) []byte