Closed LLFourn closed 1 year ago
My preference is to keep it consistent across the whole structure.
+1 on this.. This makes reasoning over the structure easier and less chance to screw up by the API.. IMO we should maintain all the invariant consistently across the API..
We don't do it in
insert_tx
for example.
However we also don't do it for apply_update
as well.
How should we approach this? For insert_tx
, should we split it into determine_insert_tx_changeset
and apply_insert_tx
?
Now that we have done #80 we always have a full tx whenever we have a txid in the
SparseChain
. In #74 we started enforcing that txs inChainGraph
don't double spend each other but only indetermine_changeset
. We are inconsistent about this though. We don't do it ininsert_tx
for example. This is an issue to discuss whether we want to do this across the whole structure. If we are not going to always enforcing it then we shouldn't just do it indetermine_changeset
. We should have a separate method likedetermine_changeset_evict_conflicts
that doesdetermine_changeset
.My preference is to keep it consistent across the whole structure.