Skip to content

Save/Load Wallet

Luke Champine requested to merge disk into master

Pretty straightforward. The only thing a wallet saves is that {UnlockConditions, SecretKey} pair of each entry in its w.keys map. This means that saves are relatively efficient. Loads, on the other hand, require rebuilding both the w.keys map and the w.timelockedKeys map. More importantly, they require reconstructing all of the outputs associated with a key, which means rescanning the blockchain from the beginning. Fortunately, loads are much less frequent than saves, so this isn't a huge deal. In the future we can worry about making them more efficient (probably by saving the outputs and then adjusting them as needed to account for consensus changes).

Merge request reports