OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Wed, 26 Jun 2019 14:01:40 +0000 (22:01 +0800)
committerChengcheng Zhang <943420582@qq.com>
Wed, 26 Jun 2019 14:01:40 +0000 (22:01 +0800)
database/wallet_store.go

index 47884e5..92a46d0 100644 (file)
@@ -203,6 +203,20 @@ func (store *WalletStore) SetAssetDefinition(assetID *bc.AssetID, definition []b
        }
 }
 
+// // GetRawProgram get raw program by hash
+// func (store *WalletStore) GetRawProgram(hash common.Hash) ([]byte, error) {
+//     rawProgram := store.walletDB.Get(ContractKey(hash))
+//     if rawProgram == nil {
+//             return nil, fmt.Errorf("failed get account control program:%x ", hash)
+//     }
+
+//     accountCP := new(account.CtrlProgram)
+//     if err := json.Unmarshal(rawProgram, &accountCP); err != nil {
+//             return nil, err
+//     }
+//     return accountCP, nil
+// }
+
 // GetRawProgram get raw program by hash
 func (store *WalletStore) GetRawProgram(hash common.Hash) []byte {
        return store.walletDB.Get(ContractKey(hash))