-
Notifications
You must be signed in to change notification settings - Fork 174
Description
This issue is an attempt to solve this TODO:
dcrwallet/wallet/udb/addressmanager.go
Lines 504 to 507 in 746bab5
// TODO: Instead of opening a second read transaction after making a change, and | |
// then fetching the account properties with a new read tx, this can be made | |
// more performant by simply returning the new account properties during the | |
// change. |
I think this TODO is talking about the AccountProperties method when the account is not imported, one read is done to check if the account is invalid and in the accountInfo map, and another is done to get the last used address index. To make it only read once loadAccountInfo needs to store or return the index data.
However, the TODO also makes a reference to "making a change" which makes me think I don't understand the problem correctly. Are changes being made somewhere else in the code, then this is being called when those changes could return the AccountProperties?
After understanding the problem I would like to work on it.