@@ -44,6 +44,7 @@ const allAccountsAddresses = [];
44
44
let isTokensBalanceIndexed = false ;
45
45
46
46
const indexTokenModuleAssets = async dbTrx => {
47
+ logger . info ( 'Starting to index the genesis assets from the Token module.' ) ;
47
48
const genesisBlockAssetsLength = await requestConnector ( 'getGenesisAssetsLength' , {
48
49
module : MODULE . TOKEN ,
49
50
subStore : MODULE_SUB_STORE . TOKEN . USER ,
@@ -75,9 +76,13 @@ const indexTokenModuleAssets = async dbTrx => {
75
76
}
76
77
77
78
await updateTotalLockedAmounts ( tokenIDLockedAmountChangeMap , dbTrx ) ;
79
+ logger . info ( 'Finished indexing all the genesis assets from the Token module.' ) ;
78
80
} ;
79
81
80
82
const indexPosValidatorsInfo = async ( numValidators , dbTrx ) => {
83
+ logger . debug (
84
+ 'Starting to index the PoS Validators information from the genesis PoS module assets.' ,
85
+ ) ;
81
86
if ( numValidators > 0 ) {
82
87
const commissionsTable = await getCommissionsTable ( ) ;
83
88
@@ -99,9 +104,13 @@ const indexPosValidatorsInfo = async (numValidators, dbTrx) => {
99
104
100
105
await commissionsTable . upsert ( commissionEntries , dbTrx ) ;
101
106
}
107
+ logger . debug (
108
+ 'Finished indexing the PoS Validators information from the genesis PoS module assets.' ,
109
+ ) ;
102
110
} ;
103
111
104
112
const indexPosStakesInfo = async ( numStakers , dbTrx ) => {
113
+ logger . debug ( 'Starting to index the PoS stakes information from the genesis PoS module assets.' ) ;
105
114
let totalStake = BigInt ( 0 ) ;
106
115
let totalSelfStake = BigInt ( 0 ) ;
107
116
@@ -144,9 +153,11 @@ const indexPosStakesInfo = async (numStakers, dbTrx) => {
144
153
145
154
await updateTotalSelfStake ( totalSelfStake , dbTrx ) ;
146
155
logger . info ( `Updated total self-stakes information at genesis: ${ totalSelfStake . toString ( ) } .` ) ;
156
+ logger . debug ( 'Finished indexing the PoS stakes information from the genesis PoS module assets.' ) ;
147
157
} ;
148
158
149
159
const indexPosModuleAssets = async dbTrx => {
160
+ logger . info ( 'Starting to index the genesis assets from the PoS module.' ) ;
150
161
const genesisBlockAssetsLength = await requestConnector ( 'getGenesisAssetsLength' , {
151
162
module : MODULE . POS ,
152
163
} ) ;
@@ -155,11 +166,14 @@ const indexPosModuleAssets = async dbTrx => {
155
166
156
167
await indexPosValidatorsInfo ( numValidators , dbTrx ) ;
157
168
await indexPosStakesInfo ( numStakers , dbTrx ) ;
169
+ logger . info ( 'Finished indexing all the genesis assets from the PoS module.' ) ;
158
170
} ;
159
171
160
172
const indexGenesisBlockAssets = async dbTrx => {
173
+ logger . info ( 'Starting to index the genesis assets.' ) ;
161
174
await indexTokenModuleAssets ( dbTrx ) ;
162
175
await indexPosModuleAssets ( dbTrx ) ;
176
+ logger . info ( 'Finished indexing all the genesis assets.' ) ;
163
177
} ;
164
178
165
179
const indexTokenBalances = async ( ) => {
0 commit comments