diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index ca127810e5..a345b589e8 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- New `endBlock` option on datasources (#2064) - Add Concordium to network family (#2078) ## [3.2.0] - 2023-10-25 diff --git a/packages/node-core/CHANGELOG.md b/packages/node-core/CHANGELOG.md index 2077f31295..fa960f10cf 100644 --- a/packages/node-core/CHANGELOG.md +++ b/packages/node-core/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - WorkerInMemoryCacheService from node (#2125) +- New `endBlock` option on datasources (#2064) + +### Fixed +- Wrong link to docs for testing ## [6.1.1] - 2023-10-25 ### Fixed diff --git a/packages/node-core/src/indexer/poi/poiSync.service.ts b/packages/node-core/src/indexer/poi/poiSync.service.ts index c9101d9122..d1beef847d 100644 --- a/packages/node-core/src/indexer/poi/poiSync.service.ts +++ b/packages/node-core/src/indexer/poi/poiSync.service.ts @@ -9,12 +9,13 @@ import {Sequelize, Transaction} from '@subql/x-sequelize'; import {NodeConfig} from '../../configure'; import {establishNewSequelize} from '../../db'; import {PoiEvent} from '../../events'; -import {Metadata, MetadataFactory, MetadataRepo, PlainPoiModel, PoiFactory} from '../../indexer'; import {getLogger} from '../../logger'; import {hasValue, Queue} from '../../utils'; -import {ProofOfIndex, SyncedProofOfIndex} from '../entities/Poi.entity'; +import {Metadata, MetadataFactory, MetadataRepo} from '../entities'; +import {PoiFactory, ProofOfIndex, SyncedProofOfIndex} from '../entities/Poi.entity'; import {ISubqueryProject} from '../types'; import {PoiBlock} from './PoiBlock'; +import {PlainPoiModel} from './poiModel'; const GENESIS_PARENT_HASH = hexToU8a('0x00'); const logger = getLogger('PoiSyncService'); diff --git a/packages/node-core/src/indexer/storeCache/cacheModel.spec.ts b/packages/node-core/src/indexer/storeCache/cacheModel.spec.ts index 49e8a62117..58f0f1ffba 100644 --- a/packages/node-core/src/indexer/storeCache/cacheModel.spec.ts +++ b/packages/node-core/src/indexer/storeCache/cacheModel.spec.ts @@ -159,10 +159,10 @@ describe('cacheModel', () => { let testModel: CachedModel<{id: string; field1: number}>; let sequelize: Sequelize; - const flush = async () => { + const flush = async (height?: number) => { const tx = await sequelize.transaction(); - await testModel.flush(tx); + await testModel.flush(tx, height); return tx.commit(); }; @@ -195,7 +195,7 @@ describe('cacheModel', () => { }, 1 ); - await flush(); + await flush(1); // the block range has been set expect(sypOnApplyBlockRange).toHaveBeenCalledTimes(1); diff --git a/packages/node-core/src/indexer/testing.service.ts b/packages/node-core/src/indexer/testing.service.ts index a405c1ac92..b0db467116 100644 --- a/packages/node-core/src/indexer/testing.service.ts +++ b/packages/node-core/src/indexer/testing.service.ts @@ -75,7 +75,7 @@ export abstract class TestingService { } this.logFailedTestsSummary(); } else { - const docsUrl = 'https://academy.subquery.network/build/testingframework.html'; + const docsUrl = 'https://academy.subquery.network/build/testing.html#the-subquery-testing-framework'; logger.warn( `No tests found. Please refer to the documentation for guidance on creating and running tests: ${docsUrl}` ); diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index 9a7d5e4cfc..797c663e43 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Use WorkerInMemoryCacheService from node core (#2125) +### Fixed +- Missing dependencies for testing command + ## [3.1.1] - 2023-10-25 ### Fixed - Update node-core with fix for crash when creating a dynamic datasource diff --git a/packages/node/src/subcommands/testing.module.ts b/packages/node/src/subcommands/testing.module.ts index 1cdcb55c93..b8ad91314d 100644 --- a/packages/node/src/subcommands/testing.module.ts +++ b/packages/node/src/subcommands/testing.module.ts @@ -8,8 +8,10 @@ import { ConnectionPoolService, ConnectionPoolStateManager, DbModule, + InMemoryCacheService, NodeConfig, PoiService, + PoiSyncService, StoreCacheService, StoreService, TestRunner, @@ -25,10 +27,12 @@ import { UnfinalizedBlocksService } from '../indexer/unfinalizedBlocks.service'; @Module({ providers: [ + InMemoryCacheService, StoreService, StoreCacheService, EventEmitter2, PoiService, + PoiSyncService, SandboxService, DsProcessorService, DynamicDsService, diff --git a/packages/types-core/CHANGELOG.md b/packages/types-core/CHANGELOG.md index a212b51c6f..67c17b0b04 100644 --- a/packages/types-core/CHANGELOG.md +++ b/packages/types-core/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- New `endBlock` option on datasources (#2064) ## [0.2.0] - 2023-10-20 ### Added