From d55980be3ffcae1dc8a7e6cb878565caecb2cf76 Mon Sep 17 00:00:00 2001 From: Chengcheng Zhang <943420582@qq.com> Date: Sat, 29 Jun 2019 12:31:19 +0800 Subject: [PATCH] rename DeleteControlProgram --- account/accounts.go | 2 +- account/store.go | 2 +- database/account_store.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/account/accounts.go b/account/accounts.go index a3fab828..cb75acad 100644 --- a/account/accounts.go +++ b/account/accounts.go @@ -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) } } diff --git a/account/store.go b/account/store.go index 018691c1..659c56df 100644 --- a/account/store.go +++ b/account/store.go @@ -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 diff --git a/database/account_store.go b/database/account_store.go index 621093b1..7387a4f4 100644 --- a/database/account_store.go +++ b/database/account_store.go @@ -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 { -- 2.11.0