-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sets chainProcessor sequence on wallet load (#3660)
* sets chainProcessor sequence on wallet load the chainProcessor tracks the head of the chain using both the hash and sequence of a block. when the wallet loads we currently only set the has of the chainProcessor equal to the latest headd hash from among the accounts in the wallet. one consequence of not setting the sequence at load time is that if a user creates an account while the node is offline, the chainProcessor is not fully initialized and the newly created account has its head set to null instead of set equal to the latest head in the wallet. the new account then needs to scan the whole chain to sync, even though it was just created and won't have any transactions earlier in the chain. - defines getLatestHead to load the latest head (hash and sequence) from among all accounts - sets both the hash and sequence of the chainProcessor from the latest head * fixes error message for no latest head found
- Loading branch information
Showing
3 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters