Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet: fix how leafdatas are fetched #180

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions wallet/watchonly.go
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,14 @@ func (m *WatchOnlyWalletManager) NotifyNewTransactions(txns []*mempool.TxDesc) {
txHash := tx.Tx.Hash()
log.Debugf("NotifyNewTransactions: received new tx: %s\n", txHash.String())

lds := tx.Tx.MsgTx().UData.LeafDatas
// Fetch the leaf datas for this tx.
lds, err := m.config.TxMemPool.FetchLeafDatas(txHash)
if err != nil {
log.Warnf("NotifyNewTransactions: failed to fetch leafdatas for tx %s", txHash.String())
continue
}
if lds == nil {
log.Warnf("NotifyNewTransactions: received tx %s with no Udata", txHash.String())
log.Warnf("NotifyNewTransactions: fetch nil leafdatas for tx %s", txHash.String())
continue
}
if len(lds) != len(tx.Tx.MsgTx().TxIn) {
Expand Down
Loading