Since the mapTally
loading procedure already performs the IsMine
check, we could use that instead of executing it again for the addresses that received some coins.
In other words, if an element exists in mapTally
, we can be certain that everything inside it belongs to the wallet.
So, ideally, we could decouple the mapTally
existence check from the “include empty” check (the one that is just below this line), which would avoid this second IsMine()
call for the non-empty addresses (we would need to execute it for the addresses that have no associated value in mapTally
).