@@ -3747,7 +3747,7 @@ void TestNode::continue_check_validator_load3(std::unique_ptr<TestNode::Validato
37473747 std::unique_ptr<TestNode::ValidatorLoadInfo> info2, int mode,
37483748 std::string file_pfx) {
37493749 LOG (INFO) << " continue_check_validator_load3 for blocks " << info1->blk_id .to_str () << " and "
3750- << info1 ->blk_id .to_str () << " with mode=" << mode << " and file prefix `" << file_pfx
3750+ << info2 ->blk_id .to_str () << " with mode=" << mode << " and file prefix `" << file_pfx
37513751 << " `: comparing block creators data" ;
37523752 if (info1->created_total .first <= 0 || info2->created_total .first <= 0 ) {
37533753 LOG (ERROR) << " no total created blocks statistics" ;
@@ -3808,13 +3808,14 @@ void TestNode::continue_check_validator_load3(std::unique_ptr<TestNode::Validato
38083808 block::MtCarloComputeShare shard_share (shard_count, info2->vset ->export_scaled_validator_weights ());
38093809 for (int i = 0 ; i < count; i++) {
38103810 int x1 = d[i].first , y1 = d[i].second ;
3811- double xe = (i < main_count ? (double )xs / main_count : 0 );
3811+ bool is_masterchain_validator = i < main_count;
3812+ double xe = (is_masterchain_validator ? (double )xs / main_count : 0 );
38123813 double ye = shard_share[i] * (double )ys / shard_count;
38133814 td::Bits256 pk = info2->vset ->list [i].pubkey .as_bits256 ();
38143815 double p1 = create_prob (x1, .9 * xe), p2 = shard_create_prob (y1, .9 * ye, chunk_size);
38153816 td::TerminalIO::out () << " val #" << i << " : pubkey " << pk.to_hex () << " , blocks created (" << x1 << " ," << y1
38163817 << " ), expected (" << xe << " ," << ye << " ), probabilities " << p1 << " and " << p2 << " \n " ;
3817- if (std::min (p1, p2) < .00001 ) {
3818+ if ((is_masterchain_validator ? p1 : p2) < .00001 ) {
38183819 LOG (ERROR) << " validator #" << i << " with pubkey " << pk.to_hex ()
38193820 << " : serious misbehavior detected: created less than 90% of the expected amount of blocks with "
38203821 " probability 99.999% : created ("
@@ -3827,7 +3828,7 @@ void TestNode::continue_check_validator_load3(std::unique_ptr<TestNode::Validato
38273828 cnt_ok++;
38283829 }
38293830 }
3830- } else if (std::min (p1, p2) < .005 ) {
3831+ } else if ((is_masterchain_validator ? p1 : p2) < .005 ) {
38313832 LOG (ERROR) << " validator #" << i << " with pubkey " << pk.to_hex ()
38323833 << " : moderate misbehavior detected: created less than 90% of the expected amount of blocks with "
38333834 " probability 99.5% : created ("
0 commit comments