Skip to content

Commit

Permalink
kusama staking processor debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrvano committed Dec 6, 2024
1 parent 3988385 commit 9a700c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class PolkadotStakingProcessorPolkadotHelper {
}: IBlockEraParams): Promise<
Omit<StakeEraModel, 'payout_block_id' | 'total_reward_points' | 'total_reward' | 'start_block_id'>
> {
this.logger.debug({ getEraData: { eraId, blockHash } })
this.logger.info(`getEraDataStake. eraId: ${eraId}; blockHash: ${blockHash};`);
const [totalStake, sessionStart] = await Promise.all([
this.polkadotApi.query.staking.erasTotalStake.at(blockHash, eraId),
this.polkadotApi.query.staking.erasStartSessionIndex.at(blockHash, eraId),
Expand Down Expand Up @@ -325,6 +325,7 @@ export class PolkadotStakingProcessorPolkadotHelper {
}

async getBlockHashByHeight(height: number): Promise<BlockHash> {
this.logger.info(`this.polkadotApi.rpc.chain.getBlockHash(${height})`);
return this.polkadotApi.rpc.chain.getBlockHash(height)
}

Expand Down
2 changes: 1 addition & 1 deletion main/src/modules/PolkadotStakingProcessor/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class PolkadotStakingProcessorService {
const payoutBlockHash = await this.polkadotHelper.getBlockHashByHeight(payout_block_id)
this.logger.info({ event: `payoutBlockHash is ${payoutBlockHash}`});
const payoutBlockTime = await this.polkadotHelper.getBlockTime(payoutBlockHash)
this.logger.info({ event: `payoutBlockTim is ${payoutBlockTime}`});
this.logger.info({ event: `payoutBlockTime is ${payoutBlockTime}`});

try {
const eraData = await this.polkadotHelper.getEraDataStake({ blockHash: payoutBlockHash, eraId })
Expand Down

0 comments on commit 9a700c9

Please sign in to comment.