@@ -183,17 +183,17 @@ task("populate:courts", "Populates the courts and their parameters")
183
183
) ;
184
184
}
185
185
186
- if ( courtPresent . minStake !== court . minStake ) {
186
+ if ( courtPresent . minStake !== toBigInt ( court . minStake ) ) {
187
187
change = true ;
188
188
console . log ( "Court %d: changing minStake from %d to %d" , court . id , courtPresent . minStake , court . minStake ) ;
189
189
}
190
190
191
- if ( courtPresent . alpha !== court . alpha ) {
191
+ if ( courtPresent . alpha !== toBigInt ( court . alpha ) ) {
192
192
change = true ;
193
193
console . log ( "Court %d: changing alpha from %d to %d" , court . id , courtPresent . alpha , court . alpha ) ;
194
194
}
195
195
196
- if ( courtPresent . feeForJuror !== court . feeForJuror ) {
196
+ if ( courtPresent . feeForJuror !== toBigInt ( court . feeForJuror ) ) {
197
197
change = true ;
198
198
console . log (
199
199
"Court %d: changing feeForJuror from %d to %d" ,
@@ -203,7 +203,7 @@ task("populate:courts", "Populates the courts and their parameters")
203
203
) ;
204
204
}
205
205
206
- if ( courtPresent . jurorsForCourtJump !== court . jurorsForCourtJump ) {
206
+ if ( courtPresent . jurorsForCourtJump !== toBigInt ( court . jurorsForCourtJump ) ) {
207
207
change = true ;
208
208
console . log (
209
209
"Court %d: changing jurorsForCourtJump from %d to %d" ,
@@ -228,15 +228,19 @@ task("populate:courts", "Populates the courts and their parameters")
228
228
console . log ( "Court %d: no parameter change" , court . id ) ;
229
229
continue ;
230
230
}
231
- await core . changeCourtParameters (
232
- court . id ,
233
- court . hiddenVotes ,
234
- court . minStake ,
235
- court . alpha ,
236
- court . feeForJuror ,
237
- court . jurorsForCourtJump ,
238
- [ court . timesPerPeriod [ 0 ] , court . timesPerPeriod [ 1 ] , court . timesPerPeriod [ 2 ] , court . timesPerPeriod [ 3 ] ]
239
- ) ;
231
+ try {
232
+ await core . changeCourtParameters (
233
+ court . id ,
234
+ court . hiddenVotes ,
235
+ court . minStake ,
236
+ court . alpha ,
237
+ court . feeForJuror ,
238
+ court . jurorsForCourtJump ,
239
+ [ court . timesPerPeriod [ 0 ] , court . timesPerPeriod [ 1 ] , court . timesPerPeriod [ 2 ] , court . timesPerPeriod [ 3 ] ]
240
+ ) ;
241
+ } catch ( error ) {
242
+ console . error ( "Error changing court parameters: %s" , error ) ;
243
+ }
240
244
} else {
241
245
console . log ( "Court %d not found, creating it with" , court . id , court ) ;
242
246
if ( coreType === Cores . UNIVERSITY ) {
0 commit comments