-
Notifications
You must be signed in to change notification settings - Fork 151
Description
In #1438 we introduced confidential token ids.
The simplest way to adapt mobilecoind to support this is, don't change the existing API at all, and instead give it a start-up parameter that tells it what token id to use. Then essentially ignore all tx outs that have a different token id.
One way to do that is, at the time of syncing the ledger, discard TxOut's without the configured token id and don't add them to the mobilecoind databse. However, it is possible that the user of mobilecoind will restart mobilecoind with a different token id, and if all those tx outs have been removed rather than saved, then they will get the wrong balance calculation.
If we want to support that use-case, then the next thing to do is, go to every call that returns TxOut's to the user or computes balances and make sure to filter by the current token id.
We tried to do that in #1438 but I am not confident that we found every place where this must be done.