File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
sc-consensus-subspace/src
sc-proof-of-time/src/source Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ where
417417 // Ensure proof of time is valid according to parent block
418418 if !self . pot_verifier . is_output_valid (
419419 pot_input,
420- Slot :: from ( u64 :: from ( slot) - u64 :: from ( parent_slot) ) ,
420+ slot - parent_slot,
421421 proof_of_time,
422422 parent_pot_parameters. next_parameters_change ( ) ,
423423 ) {
Original file line number Diff line number Diff line change @@ -580,7 +580,7 @@ where
580580 match GossipProof :: decode ( & mut data) {
581581 Ok ( proof) => {
582582 let next_slot_input = self . state . next_slot_input ( atomic:: Ordering :: Relaxed ) ;
583- let current_slot = Slot :: from ( u64 :: from ( next_slot_input. slot ) - 1 ) ;
583+ let current_slot = next_slot_input. slot - Slot :: from ( 1 ) ;
584584
585585 if proof. slot < current_slot {
586586 trace ! (
Original file line number Diff line number Diff line change @@ -341,14 +341,14 @@ where
341341 if quick_verification {
342342 pot_verifier. try_is_output_valid (
343343 pot_input,
344- Slot :: from ( slot - u64 :: from ( parent_slot) ) ,
344+ Slot :: from ( slot) - parent_slot,
345345 proof_of_time,
346346 pot_parameters. next_parameters_change ( ) ,
347347 )
348348 } else {
349349 pot_verifier. is_output_valid (
350350 pot_input,
351- Slot :: from ( slot - u64 :: from ( parent_slot) ) ,
351+ Slot :: from ( slot) - parent_slot,
352352 proof_of_time,
353353 pot_parameters. next_parameters_change ( ) ,
354354 )
You can’t perform that action at this time.
0 commit comments