@@ -283,12 +283,9 @@ impl State {
283283 let deregistrations = self . pending_deregistrations . remove ( & self . epoch ) ;
284284 if let Some ( deregistrations) = deregistrations {
285285 for dr in deregistrations {
286- debug ! ( "Retiring SPO {}" , hex :: encode ( dr ) ) ;
286+ debug ! ( "Retiring SPO {}" , dr ) ;
287287 match self . spos . remove ( & dr) {
288- None => error ! (
289- "Retirement requested for unregistered SPO {}" ,
290- hex:: encode( dr) ,
291- ) ,
288+ None => error ! ( "Retirement requested for unregistered SPO {}" , dr, ) ,
292289 Some ( _de_reg) => {
293290 retired_spos. push ( dr) ;
294291 }
@@ -318,7 +315,7 @@ impl State {
318315 epoch = self . epoch,
319316 block = block. number,
320317 "New pending SPO update {} {:?}" ,
321- hex :: encode ( reg. operator) ,
318+ reg. operator,
322319 reg
323320 ) ;
324321 self . pending_updates . insert ( reg. operator , reg. clone ( ) ) ;
@@ -327,7 +324,7 @@ impl State {
327324 epoch = self . epoch,
328325 block = block. number,
329326 "Registering SPO {} {:?}" ,
330- hex :: encode ( reg. operator) ,
327+ reg. operator,
331328 reg
332329 ) ;
333330 self . spos . insert ( reg. operator , reg. clone ( ) ) ;
@@ -340,8 +337,7 @@ impl State {
340337 if deregistrations. len ( ) != old_len {
341338 debug ! (
342339 "Removed pending deregistration of SPO {} from epoch {}" ,
343- hex:: encode( reg. operator) ,
344- epoch
340+ reg. operator, epoch
345341 ) ;
346342 }
347343 }
@@ -368,21 +364,17 @@ impl State {
368364 ) {
369365 debug ! (
370366 "SPO {} wants to retire at the end of epoch {} (cert in block number {})" ,
371- hex:: encode( ret. operator) ,
372- ret. epoch,
373- block. number
367+ ret. operator, ret. epoch, block. number
374368 ) ;
375369 if ret. epoch <= self . epoch {
376370 error ! (
377371 "SPO retirement received for current or past epoch {} for SPO {}" ,
378- ret. epoch,
379- hex:: encode( ret. operator)
372+ ret. epoch, ret. operator
380373 ) ;
381374 } else if ret. epoch > self . epoch + TECHNICAL_PARAMETER_POOL_RETIRE_MAX_EPOCH {
382375 error ! (
383376 "SPO retirement received for epoch {} that exceeds future limit for SPO {}" ,
384- ret. epoch,
385- hex:: encode( ret. operator)
377+ ret. epoch, ret. operator
386378 ) ;
387379 } else {
388380 // Replace any existing queued deregistrations
@@ -392,8 +384,7 @@ impl State {
392384 if deregistrations. len ( ) != old_len {
393385 debug ! (
394386 "Replaced pending deregistration of SPO {} from epoch {}" ,
395- hex:: encode( ret. operator) ,
396- epoch
387+ ret. operator, epoch
397388 ) ;
398389 }
399390 }
@@ -412,7 +403,7 @@ impl State {
412403 } else {
413404 error ! (
414405 "Historical SPO for {} not registered when try to retire it" ,
415- hex :: encode ( ret. operator)
406+ ret. operator
416407 ) ;
417408 }
418409 }
@@ -443,8 +434,7 @@ impl State {
443434 if !removed {
444435 error ! (
445436 "Historical SPO state for {} does not contain delegator {}" ,
446- hex:: encode( old_spo) ,
447- stake_address
437+ old_spo, stake_address
448438 ) ;
449439 }
450440 }
@@ -474,14 +464,13 @@ impl State {
474464 if !removed {
475465 error ! (
476466 "Historical SPO state for {} does not contain delegator {}" ,
477- hex:: encode( old_spo) ,
478- stake_address
467+ old_spo, stake_address
479468 ) ;
480469 }
481470 }
482471 }
483472 _ => {
484- error ! ( "Missing Historical SPO state for {}" , hex :: encode ( old_spo) ) ;
473+ error ! ( "Missing Historical SPO state for {}" , old_spo) ;
485474 }
486475 }
487476 }
@@ -494,8 +483,7 @@ impl State {
494483 if !added {
495484 error ! (
496485 "Historical SPO state for {} already contains delegator {}" ,
497- hex:: encode( spo) ,
498- stake_address
486+ spo, stake_address
499487 ) ;
500488 }
501489 }
0 commit comments