From 2de44dcf91fc7efd6a8cb1ea5d013df8e1471cc5 Mon Sep 17 00:00:00 2001 From: Filippo Date: Tue, 19 Nov 2024 17:10:32 +0100 Subject: [PATCH] fix: cfg node chain init (#269) --- src/mappings/handlers/blockHandlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappings/handlers/blockHandlers.ts b/src/mappings/handlers/blockHandlers.ts index 839fbbf..88f93ba 100644 --- a/src/mappings/handlers/blockHandlers.ts +++ b/src/mappings/handlers/blockHandlers.ts @@ -15,7 +15,7 @@ import { SnapshotPeriodService } from '../services/snapshotPeriodService' import { TrancheBalanceService } from '../services/trancheBalanceService' import { InvestorPositionService } from '../services/investorPositionService' import { CurrencyService } from '../services/currencyService' -import { BlockchainService } from '../services/blockchainService' +import { BlockchainService, LOCAL_CHAIN_ID } from '../services/blockchainService' const timekeeper = TimekeeperService.init() @@ -33,7 +33,7 @@ async function _handleBlock(block: SubstrateBlock): Promise { logger.info( `# It's a new period on block ${blockNumber}: ${block.timestamp.toISOString()} (specVersion: ${specVersion})` ) - const _blockchain = BlockchainService.getOrInit(chainId) + const _blockchain = BlockchainService.getOrInit(LOCAL_CHAIN_ID) const period = SnapshotPeriodService.init(blockPeriodStart) await period.save()