Skip to content

feat: using previous database if no network#563

Merged
ashchan merged 4 commits intodevelopfrom
using-prev-db-if-no-network
Jul 1, 2019
Merged

feat: using previous database if no network#563
ashchan merged 4 commits intodevelopfrom
using-prev-db-if-no-network

Conversation

@classicalliu
Copy link
Contributor

Save latest chain info (previous genesisBlockHash and systemScriptInfo) to file and load if no network no response when start or switch.

@classicalliu classicalliu requested a review from ashchan July 1, 2019 04:00
try {
const metaInfo = getMetaInfo()
await initConnection(metaInfo.genesisBlockHash)
LockUtils.setSystemScript(metaInfo.systemScriptInfo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since LockUtils is not a pure utils class any more (it stores its own state), please move it to models or other appropriate module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to models and still named LockUtils

@ashchan ashchan merged commit c3fd9b7 into develop Jul 1, 2019
@ashchan ashchan deleted the using-prev-db-if-no-network branch July 1, 2019 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants