Skip to content

Commit

Permalink
update logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiguantong committed Nov 8, 2024
1 parent 7c3656d commit 0eada32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/publisher-client/src/command/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class PublisherStarter {
version: latestConfigFromNear.version
});
if (latestConfigFromEvm && latestConfigFromEvm.version >= latestConfigFromNear.version) {
logger.info(`==> [${targetChain.name}-${targetChain.id.toString()}] ${lifecycle.aggregator}, near: ${latestConfigFromNear.version} <= evm: ${latestConfigFromEvm?.version}`, {
logger.info(`==> [${targetChain.name}-${targetChain.id.toString()}] ${lifecycle.aggregator}, 1-check near: ${latestConfigFromNear.version} <= evm: ${latestConfigFromEvm?.version}`, {
target: "config-syncer",
});
// No synchronization required
Expand All @@ -231,7 +231,10 @@ export class PublisherStarter {
// 3. Double check chain config state on xapi contract
const exAggregator = await this.deriveXAPIAddress(lifecycle.aggregator, lifecycle);
const aggregatorConfigEvm = await lifecycle.nearEthereum.getContractViewFunction(latestConfigFromNear.xapi_address, xapiAbi, "aggregatorConfigs", [exAggregator]);
if (aggregatorConfigEvm.version >= latestConfigFromNear.version) {
if (aggregatorConfigEvm && aggregatorConfigEvm.version >= latestConfigFromNear.version) {
logger.info(`==> [${targetChain.name}-${targetChain.id.toString()}] ${lifecycle.aggregator}, 2-check near: ${latestConfigFromNear.version} <= evm: ${aggregatorConfigEvm?.version}`, {
target: "config-syncer",
});
return;
}
logger.info(`==> [${targetChain.name}-${targetChain.id.toString()}] ${lifecycle.aggregator}, near: ${latestConfigFromNear.version} > evm: ${latestConfigFromEvm?.version}`, {
Expand Down

0 comments on commit 0eada32

Please sign in to comment.