@@ -2240,6 +2240,7 @@ namespace beam
22402240 Magic.v2 = 2 ;
22412241
22422242 m_Pbft.m_Whitelist .m_NumRequired = 0 ;
2243+ m_Pbft.m_RoundUp_ms = 0 ;
22432244
22442245 // 1 eth == 10^18 wei
22452246 // 1 beam == 10^8 groth
@@ -2533,31 +2534,6 @@ namespace beam
25332534 // (addr == m_Addresses[iPos]);
25342535 }
25352536
2536- uint64_t Rules::Pbft::T2S (uint64_t t_ms) const
2537- {
2538- assert (Consensus::Pbft == get_ParentObj ().m_Consensus );
2539- auto tSlot_ms = get_ParentObj ().DA .Target_ms ;
2540- if (!tSlot_ms)
2541- return 0 ; // ?!
2542-
2543- return t_ms / tSlot_ms;
2544- }
2545-
2546- uint64_t Rules::Pbft::T2S_strict (uint64_t t_ms) const
2547- {
2548- auto iSlot = T2S (t_ms);
2549- if (iSlot * get_ParentObj ().DA .Target_ms != t_ms)
2550- return 0 ; // inaccurate timestamp
2551-
2552- return iSlot;
2553- }
2554-
2555- uint64_t Rules::Pbft::S2T (uint64_t iSlot) const
2556- {
2557- assert (Consensus::Pbft == get_ParentObj ().m_Consensus );
2558- return iSlot * get_ParentObj ().DA .Target_ms ; // don't care about overflow
2559- }
2560-
25612537 void Rules::UpdateChecksum ()
25622538 {
25632539 Exc::CheckpointTxt cp (" Rules" );
@@ -2623,8 +2599,9 @@ namespace beam
26232599 std::sort (vec.begin (), vec.end ());
26242600
26252601 oracle
2626- << " pbft.2 "
2602+ << " pbft.3 "
26272603 << DA.Target_ms
2604+ << x.m_RoundUp_ms
26282605 << x.m_Whitelist .m_NumRequired
26292606 << vec.size ();
26302607
@@ -2788,6 +2765,7 @@ namespace beam
27882765 m_Consensus = Consensus::Pbft;
27892766 DA.Target_ms = nTarget_ms;
27902767 DA.Difficulty0 .m_Packed = 0 ;
2768+ m_Pbft.m_RoundUp_ms = nTarget_ms / 4 ;
27912769
27922770 ZeroObject (Emission);
27932771 Maturity.Coinbase = 0 ;
0 commit comments