-
Notifications
You must be signed in to change notification settings - Fork 311
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
[chain] last_seen_unconfirmed should have a default of None
not 0
#1396
Comments
What is the exact distinction between |
Maybe the reason we didn't do an |
None
not 0None
not 0
Assuming we treat a last_seen of 0 as effectively |
Indeed an alternative proposal is to treat 0 as a magic value. But this means that two states have the same semantics (when the |
Current implementation of
TxGraph
insert_tx
is:The 0 in the tuple represents the last time the transaction has been seen unconfirmed. I think it is wrong to set
0
here because you should be able to insert transactions into the graph (or wallet) that have never been broadcast and have never been seen. When you list canonical transactions1 you don't want to list transactions that have been inserted but never actually seen. In other words the field should be anOption
which is still monotonically increasing withNone
being the smallest value.I don't think this change affects the changeset struct, it just changes how you interpret a missing
last_seen
.Footnotes
Incidentally we should rename
try_list_chain_txs
tocanonincal_transactions
↩The text was updated successfully, but these errors were encountered: