Skip to content

Commit

Permalink
Merge pull request #775 from ennmichael/unconfirmed-txn-notification-…
Browse files Browse the repository at this point in the history
…label

Fixed a bug where unconfirmed txn notifications were missing a label
  • Loading branch information
Roasbeef authored Dec 7, 2021
2 parents 0e7307b + 82a98b1 commit f275d2b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3468,19 +3468,16 @@ func (w *Wallet) reliablyPublishTransaction(tx *wire.MsgTx,
}
}

if err := w.addRelevantTx(dbTx, txRec, nil); err != nil {
return err
}

// If the tx label is empty, we can return early.
if len(label) == 0 {
return nil
}

// If there is a label we should write, get the namespace key
// and record it in the tx store.
txmgrNs := dbTx.ReadWriteBucket(wtxmgrNamespaceKey)
return w.TxStore.PutTxLabel(txmgrNs, tx.TxHash(), label)
if len(label) != 0 {
txmgrNs := dbTx.ReadWriteBucket(wtxmgrNamespaceKey)
if err = w.TxStore.PutTxLabel(txmgrNs, tx.TxHash(), label); err != nil {
return err
}
}

return w.addRelevantTx(dbTx, txRec, nil)
})
if err != nil {
return nil, err
Expand Down

0 comments on commit f275d2b

Please sign in to comment.