You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
The best strategy to achieve this would be to keep a local collection unspents for utxos (the crawler component should keep this in sync watching the chain continuously) and to create a sort of spendings collection that resembles the concept in databases of the "write-ahead log".
When a new swap it's taken and accepted by the daemon, both the unspents and the spendings collection need to be atomically updated, respectively "logically deleting" the unspent "to be consumed" by the swap in the former and inserting a "sort of" new utxo in the latter. (I say sort of because we wouldn't have yet a txid field like in the unspesnts one, but we are interested only in the value and asset field)
The balances endpoint would need to calculate the real available balance aggregating the two collection, NOT only looking in the unspents colelction, but both.
The text was updated successfully, but these errors were encountered:
The best strategy to achieve this would be to keep a local collection
unspents
for utxos (the crawler component should keep this in sync watching the chain continuously) and to create a sort ofspendings
collection that resembles the concept in databases of the "write-ahead log".When a new swap it's taken and accepted by the daemon, both the
unspents
and thespendings
collection need to be atomically updated, respectively "logically deleting" the unspent "to be consumed" by the swap in the former and inserting a "sort of" new utxo in the latter. (I say sort of because we wouldn't have yet a txid field like in the unspesnts one, but we are interested only in the value and asset field)The balances endpoint would need to calculate the real available balance aggregating the two collection, NOT only looking in the
unspents
colelction, but both.The text was updated successfully, but these errors were encountered: