Improve logging of rewindHeight when handling un-finalized blocks #3018
Improve logging of rewindHeight when handling un-finalized blocks #3018lorrod wants to merge 2 commits intosubquery:mainfrom
rewindHeight when handling un-finalized blocks #3018Conversation
Fix logging message format for un-finalized blocks handling.
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/node-core/src/indexer/unfinalizedBlocks.service.ts (1)
18-18: Fix import order to satisfy ESLintimport/order.Line 18 places
node:utilafter local imports; this violates the reported rule and may fail lint checks.Proposed diff
import assert from 'assert'; +import util from 'node:util'; import {Inject, Injectable} from '@nestjs/common'; import {OnEvent} from '@nestjs/event-emitter'; import {Transaction} from '@subql/x-sequelize'; import {isEqual, last} from 'lodash'; import {IBlockchainService} from '../blockchain.service'; import {NodeConfig} from '../configure'; import {IndexerEvent} from '../events'; import {Header, IBlock} from '../indexer/types'; import {getLogger} from '../logger'; import {mainThreadOnly} from '../utils'; import {ProofOfIndex} from './entities'; import {PoiBlock} from './poi'; import {IStoreModelProvider} from './storeModelProvider'; -import util from 'node:util';As per coding guidelines, "Run ESLint with TypeScript support, Prettier, and various plugins across all TypeScript files using configured husky pre-commit hooks and lint-staged".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/node-core/src/indexer/unfinalizedBlocks.service.ts` at line 18, Reorder the imports so Node built-ins come before local/project imports: move the line "import util from 'node:util';" to the top of packages/node-core/src/indexer/unfinalizedBlocks.service.ts (before any local imports) to satisfy ESLint import/order; then run the linter/formatters (ESLint + Prettier) or the project's husky pre-commit hooks to confirm the rule passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/node-core/src/indexer/unfinalizedBlocks.service.ts`:
- Line 18: Reorder the imports so Node built-ins come before local/project
imports: move the line "import util from 'node:util';" to the top of
packages/node-core/src/indexer/unfinalizedBlocks.service.ts (before any local
imports) to satisfy ESLint import/order; then run the linter/formatters (ESLint
+ Prettier) or the project's husky pre-commit hooks to confirm the rule passes.
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
Summary by CodeRabbit