-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow for funding transactions with unconfirmed outputs #722
Conversation
…t been confirmed yet
@@ -168,7 +168,9 @@ func (w *SingleAddressWallet) Balance() (spendable, confirmed, unconfirmed types | |||
confirmed = confirmed.Add(sce.Value) | |||
} | |||
for _, sco := range w.tpoolUtxos { | |||
unconfirmed = unconfirmed.Add(sco.Value) | |||
if !w.isOutputUsed(sco.ID) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably fine but I was expecting a check against tpoolSpent
here, what's the difference between tpoolSpent
and tpoolUtxos
, to me it seems like they're the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to check for both the used timestamp as well as tpoolSpent
within isOutputUsed
.
tpoolSpent
indicates whether an output is spent according to the transaction pool
tpoolUtxos
tracks all outputs in the transaction pool, even the spent ones
No description provided.