OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 14:14:24 +0000 (22:14 +0800)
committerChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 14:14:24 +0000 (22:14 +0800)
database/wallet_store.go
wallet/store.go
wallet/utxo.go

index 6efd0a2..6614c4a 100644 (file)
@@ -196,8 +196,8 @@ func (store *WalletStore) DeleteRecoveryStatus() {
        }
 }
 
-// DeleteStardardUTXO delete stardard utxo by outputID
-func (store *WalletStore) DeleteStardardUTXO(outputID bc.Hash) {
+// DeleteStandardUTXO delete stardard utxo by outputID
+func (store *WalletStore) DeleteStandardUTXO(outputID bc.Hash) {
        if store.batch == nil {
                store.walletDB.Delete(StandardUTXOKey(outputID))
        } else {
index 7d9b05b..62e4348 100644 (file)
@@ -13,7 +13,7 @@ type WalletStore interface {
        CommitBatch() error
        DeleteContractUTXO(bc.Hash)
        DeleteRecoveryStatus()
-       DeleteStardardUTXO(bc.Hash)
+       DeleteStandardUTXO(bc.Hash)
        DeleteTransactions(uint64)
        DeleteUnconfirmedTransaction(string)
        DeleteWalletTransactions()
index 868da81..cd3819b 100644 (file)
@@ -54,7 +54,7 @@ func (w *Wallet) attachUtxos(b *types.Block, txStatus *bc.TransactionStatus) {
                inputUtxos := txInToUtxos(tx, statusFail)
                for _, inputUtxo := range inputUtxos {
                        if segwit.IsP2WScript(inputUtxo.ControlProgram) {
-                               w.store.DeleteStardardUTXO(inputUtxo.OutputID)
+                               w.store.DeleteStandardUTXO(inputUtxo.OutputID)
                        } else {
                                w.store.DeleteContractUTXO(inputUtxo.OutputID)
                        }
@@ -84,7 +84,7 @@ func (w *Wallet) detachUtxos(b *types.Block, txStatus *bc.TransactionStatus) {
                        }
 
                        if segwit.IsP2WScript(code) {
-                               w.store.DeleteStardardUTXO(*tx.ResultIds[j])
+                               w.store.DeleteStandardUTXO(*tx.ResultIds[j])
                        } else {
                                w.store.DeleteContractUTXO(*tx.ResultIds[j])
                        }