-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionary v2 #2257
Dictionary v2 #2257
Conversation
packages/node-core/src/indexer/blockDispatcher/block-dispatcher.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need tests
packages/node/src/indexer/dictionary/v2/substrateDictionaryV2.ts
Outdated
Show resolved
Hide resolved
packages/node-core/src/indexer/dictionary/dictionary.service.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to use IBlock with UnfinalizedBlocks. It should be able to simplify implementation. https://github.com/subquery/subql/blob/main/packages/node/src/indexer/unfinalizedBlocks.service.ts#L17
Co-authored-by: Scott Twiname <[email protected]>
Co-authored-by: Scott Twiname <[email protected]>
packages/node-core/src/indexer/blockDispatcher/worker-block-dispatcher.ts
Outdated
Show resolved
Hide resolved
packages/node-core/src/indexer/dictionary/dictionary.service.spec.ts
Outdated
Show resolved
Hide resolved
packages/node-core/src/indexer/dictionary/dictionary.service.ts
Outdated
Show resolved
Hide resolved
@@ -36,11 +36,6 @@ export class UnfinalizedBlocksService extends BaseUnfinalizedBlocksService< | |||
super(nodeConfig, storeCache); | |||
} | |||
|
|||
@mainThreadOnly() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also remove substrateHeaderToHeader
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside this place been used, I think a few other places are using is it
const header = substrateHeaderToHeader(finalizedHeader); return substrateHeaderToHeader(
packages/node/src/indexer/worker/worker.unfinalizedBlocks.service.ts
Outdated
Show resolved
Hide resolved
packages/node/src/utils/substrate.ts
Outdated
getHeader: () => { | ||
return { | ||
hash: blockHeader.block.header.hash.toString(), | ||
height: blockHeader.block.header.number.toNumber(), | ||
parentHash: blockHeader.block.header.parentHash.toString(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be put into a function to dedupe with https://github.com/subquery/subql/pull/2257/files#diff-622aec34f349237d6d2b7b613e44aedbe25468c88ba6597f2051bb9c825d55f4R396-R398
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea to unify getHeader: () return type with Header
https://github.com/subquery/subql/pull/2257/files#diff-8138bbd5bd4b60a1dea77c9b7b6577d99ff57d83838c9a49fe66024a1793b153R23, so substrateHeaderToHeader
can be re-used
Co-authored-by: Scott Twiname <[email protected]>
Co-authored-by: Scott Twiname <[email protected]>
Co-authored-by: Scott Twiname <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the headers have 2023 in the files, should be 2024
Co-authored-by: Scott Twiname <[email protected]>
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist