Created
June 20, 2022 14:34
-
-
Save jeremyorme/dd8e1073974eacaa70c6dd7b58b98c57 to your computer and use it in GitHub Desktop.
DbStoreUpdater._areEntryBlocksValid method
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
_areEntryBlocksValid(entryBlockList: IEntryBlockList, entryBlocks: (IEntryBlock|null)[]) { | |
if (!entryBlocks.every((entryBlock, i) => this._isEntryBlockValid(entryBlock, entryBlockList, i == entryBlockList.entryBlockCids.length - 1))) | |
return false; | |
if (!this._areEntriesValid(mergeArrays(entryBlocks.map(entryBlock => entryBlock ? entryBlock.entries : [])), entryBlockList)) | |
return false; | |
// success! | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment