Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

feat: transaction sync state persistance #226

Open
wants to merge 27 commits into
base: v0.22-dev
Choose a base branch
from

Conversation

Alex-Werner
Copy link
Contributor

@Alex-Werner Alex-Werner commented Feb 8, 2021

Issue being fixed or feature implemented

This PR ensure persistance storage of transaction synchronisation state.

One caveat with this solution is that is a user decide to bypass initial synchronisation with skipSynchronizationBeforeHeight, it will be set as initial state and will then be reloaded on next startup from that height or above.

What was done?

  • fix: rehydrate state on async setItem
  • feat: ensure setting account hash/height triggers saveState

How Has This Been Tested?

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • [] I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@Alex-Werner Alex-Werner added this to the v0.18 milestone Feb 8, 2021
@lgtm-com
Copy link

lgtm-com bot commented Feb 8, 2021

This pull request introduces 1 alert when merging 11449d0 into f8b7e2e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Feb 8, 2021

This pull request introduces 1 alert when merging 7309dc0 into f8b7e2e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@Alex-Werner Alex-Werner force-pushed the feat/persistance-storage branch from 7309dc0 to f72fd44 Compare February 8, 2021 00:35
@lgtm-com
Copy link

lgtm-com bot commented Feb 8, 2021

This pull request introduces 1 alert when merging f72fd44 into f8b7e2e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@Alex-Werner Alex-Werner force-pushed the feat/persistance-storage branch from f72fd44 to acf8e6e Compare February 8, 2021 02:25
@shumkov
Copy link
Member

shumkov commented Feb 10, 2021

Introduce LocalForageAdaptor and NodeForageAdaptor with the same interface which accept LocalForage and NodeForage instances in contructructors respectively.

@Alex-Werner Alex-Werner marked this pull request as ready for review February 16, 2021 00:14
@lgtm-com
Copy link

lgtm-com bot commented Feb 16, 2021

This pull request introduces 1 alert when merging f907825 into 8b27966 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@Alex-Werner Alex-Werner force-pushed the feat/persistance-storage branch from 2bc3232 to 83e2dd1 Compare February 18, 2021 05:43
@shumkov shumkov changed the base branch from v0.18-dev to v0.19-dev March 3, 2021 11:16
@thephez thephez modified the milestones: v0.18, v0.19 Mar 16, 2021
@shumkov shumkov changed the base branch from v0.19-dev to master May 5, 2021 07:39
@antouhou antouhou changed the base branch from master to v0.22-dev October 25, 2021 16:11
Konstantin Shuplenkov added 2 commits October 26, 2021 19:08
# Conflicts:
#	src/plugins/Plugins/ChainPlugin.js
#	src/plugins/Workers/TransactionSyncStreamWorker/TransactionSyncStreamWorker.js
#	src/plugins/Workers/TransactionSyncStreamWorker/methods/syncUpToTheGapLimit.js
#	src/types/Account/Account.spec.js
#	src/types/Account/_initializeAccount.js
#	src/types/Account/methods/getTransaction.js
#	src/types/Account/methods/getUTXOS.js
#	src/types/Account/methods/getUTXOS.spec.js
#	src/types/Storage/Storage.js
#	src/types/Storage/Storage.spec.js
#	src/types/Storage/methods/configure.js
#	src/types/Storage/methods/createChain.js
#	src/types/Storage/methods/createChain.spec.js
#	src/types/Storage/methods/createWallet.spec.js
#	src/types/Storage/methods/rehydrateState.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants