Great! Thanks for posting links to code!
Question:
new_entry = false;
+ // TODO: We should probably really have a map of asset ids to amounts per ledger entry
+ if( entry.amount.asset_id == amount.asset_id )
+ entry.amount += amount;
+ else if( entry.amount.amount == 0 )
+ entry.amount = amount;
Will you check this logic.
I see that this will fail when transferring assets other than the base asset, as I must have realized at some level before relegating the thought to the TODO there. Good catch! Will think how to address this.
Transactions can be almost arbitrarily complex but to keep meaningful records in our simple wallet we are making strong simplifying assumptions for now. We also have the problem that everyone already has a wallet using a certain format for storing their existing transaction records.
And also - are there tests associated with this code? I know it's a lot to ask for but we should have good integration tests that try all kinds of things.
E.g. have you thoroughly tested with multiple assets. Or able to simulate a missing transaction on the sending/receiving end, and see how the system behaves?
No tests yet, but I intend to write them when there is some time. Still many other fires to put out at the moment.
I have not thoroughly tested with multiple assets / market functionality yet, as is clear from the problem above. Missing transfers of the base asset on sending and receiving side are correctly reconstructed, however.
I also forgot to mention that in the OP, you seem to have been affected by problems with transaction scanning combined with an issue that causes transactions to be stuck pending. This is a known issue but we are still tracking down the cause. Sometimes they get unstuck after some random period of time, so be cautious about resending transactions.