Skip to content

Commit

Permalink
Merge pull request #482 from p2p-org/mbelt3/stage
Browse files Browse the repository at this point in the history
Mbelt3/stage
  • Loading branch information
rcrvano authored Dec 6, 2024
2 parents 7f408ce + 48c6625 commit edbb8ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ environment: dev
additional_args: []
metrics:
enabled: true
image: {repository: europe-docker.pkg.dev/substrate-infra/images/mbelt3_preloader, tag: ca1da7fa38c7b509f62259459b5d2f3cf2937407}
image: {repository: europe-docker.pkg.dev/substrate-infra/images/mbelt3_preloader, tag: 9a700c973777ac4d863c837d1a9835ed8c5ab464}
replicas: 1
port: 3000
migrations:
Expand Down
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 edbb8ee

Please sign in to comment.