OSDN Git Service

Add mempool new tx subscription support (#1578)
[bytom/bytom.git] / wallet / unconfirmed.go
index 771d7dd..2aba1e6 100644 (file)
@@ -84,6 +84,10 @@ func (w *Wallet) GetUnconfirmedTxByTxID(txID string) (*query.AnnotatedTx, error)
 
 // RemoveUnconfirmedTx handle wallet status update when tx removed from txpool
 func (w *Wallet) RemoveUnconfirmedTx(txD *protocol.TxDesc) {
+       if !w.checkRelatedTransaction(txD.Tx) {
+               return
+       }
+       w.DB.Delete(calcUnconfirmedTxKey(txD.Tx.ID.String()))
        w.AccountMgr.RemoveUnconfirmedUtxo(txD.Tx.ResultIds)
 }