From: Chengcheng Zhang <943420582@qq.com> Date: Tue, 2 Jul 2019 14:58:40 +0000 (+0800) Subject: remove SetStandardUTXO in walletstore X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ddc2cbf60db52187273858cac570bf671d4d5efa;p=bytom%2Fvapor.git remove SetStandardUTXO in walletstore --- diff --git a/database/wallet_store.go b/database/wallet_store.go index 6614c4a4..2f4a846a 100644 --- a/database/wallet_store.go +++ b/database/wallet_store.go @@ -477,20 +477,6 @@ func (store *WalletStore) SetRecoveryStatus(recoveryKey, rawStatus []byte) { } } -// SetStandardUTXO set standard utxo -func (store *WalletStore) SetStandardUTXO(outputID bc.Hash, utxo *acc.UTXO) error { - data, err := json.Marshal(utxo) - if err != nil { - return err - } - if store.batch == nil { - store.walletDB.Set(StandardUTXOKey(outputID), data) - } else { - store.batch.Set(StandardUTXOKey(outputID), data) - } - return nil -} - // SetTransaction set raw transaction by block height and tx position func (store *WalletStore) SetTransaction(height uint64, tx *query.AnnotatedTx) error { batch := store.walletDB.NewBatch() diff --git a/wallet/store.go b/wallet/store.go index cd169230..e0f33d0a 100644 --- a/wallet/store.go +++ b/wallet/store.go @@ -14,7 +14,7 @@ type WalletStore interface { DeleteContractUTXO(bc.Hash) DeleteRecoveryStatus() DeleteStandardUTXO(bc.Hash) // delete it - DeleteTransactions(uint64) + DeleteTransactions(uint64) DeleteUnconfirmedTransaction(string) DeleteWalletTransactions() DeleteWalletUTXOs() @@ -33,7 +33,6 @@ type WalletStore interface { SetContractUTXO(bc.Hash, *acc.UTXO) error SetGlobalTransactionIndex(string, *bc.Hash, uint64) SetRecoveryStatus([]byte, []byte) // recoveryManager.state isn't exported outside - SetStandardUTXO(bc.Hash, *acc.UTXO) error // delete it SetTransaction(uint64, *query.AnnotatedTx) error SetUnconfirmedTransaction(string, *query.AnnotatedTx) error SetWalletInfo([]byte) // need move database.NewWalletStore in wallet package