OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 01:51:55 +0000 (09:51 +0800)
committerChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 01:51:55 +0000 (09:51 +0800)
database/wallet_store.go

index 88bd3d9..be84b3d 100644 (file)
@@ -296,7 +296,7 @@ func (store *WalletStore) GetAsset(assetID *bc.AssetID) (*asset.Asset, error) {
 func (store *WalletStore) GetControlProgram(hash bc.Hash) (*acc.CtrlProgram, error) {
        rawProgram := store.walletDB.Get(ContractKey(hash))
        if rawProgram == nil {
-               return nil, fmt.Errorf("failed get account control program:%x ", hash)
+               return nil, acc.ErrFindCtrlProgram
        }
        accountCP := new(acc.CtrlProgram)
        if err := json.Unmarshal(rawProgram, &accountCP); err != nil {