Skip to content

Instantly share code, notes, and snippets.

@jeremyorme
Created June 20, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyorme/afc676937a05e01a3b11a8c1d80ff7ef to your computer and use it in GitHub Desktop.
Save jeremyorme/afc676937a05e01a3b11a8c1d80ff7ef to your computer and use it in GitHub Desktop.
DbStoreUpdater._isStoreValid method
_isStoreValid(store: IStore|null) {
// check_store_exists(IStore)
if (!store) {
console.log('[Db] ERROR: Store structure not found (address = ' + this._address + ')');
return false;
}
// check_store_syntax(IStore)
if (!validateStore(store)) {
console.log('[Db] ERROR: Store structure invalid (address = ' + this._address + ')');
return false;
}
return store.entryBlockLists.every(entryBlockList => this._isEntryBlockListValid(entryBlockList));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment