OSDN Git Service

rename DeleteControlProgram
authorChengcheng Zhang <943420582@qq.com>
Sat, 29 Jun 2019 04:31:19 +0000 (12:31 +0800)
committerChengcheng Zhang <943420582@qq.com>
Sat, 29 Jun 2019 04:31:19 +0000 (12:31 +0800)
account/accounts.go
account/store.go
database/account_store.go

index a3fab82..cb75aca 100644 (file)
@@ -273,7 +273,7 @@ func (m *Manager) deleteAccountControlPrograms(accountID string) error {
        for _, cp := range cps {
                if cp.AccountID == accountID {
                        sha3pool.Sum256(hash[:], cp.ControlProgram)
-                       m.store.DeleteRawProgram(hash)
+                       m.store.DeleteControlProgram(hash)
                }
        }
 
index 018691c..659c56d 100644 (file)
@@ -17,7 +17,7 @@ type AccountStorer interface {
        GetAccountIndex([]chainkd.XPub) uint64
        DeleteAccountByAccountAlias(string)
        DeleteAccountByAccountID(string)
-       DeleteRawProgram(common.Hash)
+       DeleteControlProgram(common.Hash)
        DeleteBip44ContractIndex(string)
        DeleteContractIndex(string)
        GetContractIndex(string) uint64
index 621093b..7387a4f 100644 (file)
@@ -143,8 +143,8 @@ func (store *AccountStore) DeleteAccountByAccountID(accountID string) {
        }
 }
 
-// DeleteRawProgram delete raw control program by hash
-func (store *AccountStore) DeleteRawProgram(hash common.Hash) {
+// DeleteControlProgram delete raw control program by hash
+func (store *AccountStore) DeleteControlProgram(hash common.Hash) {
        if store.batch == nil {
                store.accountDB.Delete(ContractKey(hash))
        } else {