From e4a383e340e1bf1ef0dc8e57d5a4c5b49f1f8d9e Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Apr 2018 00:36:12 +0300 Subject: [PATCH 1/4] Add notary 3 to recent miners print --- src/miner.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index aece99e38..71537bce9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -840,7 +840,7 @@ void static BitcoinMiner() if ( i == 33 ) externalflag = 1; else externalflag = 0; - if ( NOTARY_PUBKEY33[0] != 0 && (notaryid < 3 || notaryid == 34 || notaryid == 51 || notaryid == 52) ) + if ( NOTARY_PUBKEY33[0] != 0 ) { for (i=1; i<66; i++) if ( memcmp(pubkeys[i],pubkeys[0],33) == 0 ) @@ -849,9 +849,12 @@ void static BitcoinMiner() printf("VIOLATION at %d, notaryid.%d\n",i,mids[i]); for (j=gpucount=0; j<65; j++) { - if ( mids[j] >= 0 || notaryid == 34 ) - fprintf(stderr,"%d ",mids[j]); - else fprintf(stderr,"GPU "); + if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 ) + { + if ( mids[j] >= 0 ) + fprintf(stderr,"%d ",mids[j]); + else fprintf(stderr,"GPU "); + } if ( mids[j] == -1 ) gpucount++; } From 2c7ba74d0eeb8a26547ce5ab1fd767505bc2a0f8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Apr 2018 00:38:30 +0300 Subject: [PATCH 2/4] Fix --- src/miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 71537bce9..dace45ee4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -868,7 +868,8 @@ void static BitcoinMiner() roundrobin_delay += ((delta * i) / 64) - delta; //fprintf(stderr,"delta.%f %f %f\n",delta,(double)(gpucount - j/3) / 2,(delta * i) / 64); } - fprintf(stderr," <- prev minerids from ht.%d notary.%d gpucount.%d %.2f%% t.%u %d\n",pindexPrev->nHeight,notaryid,gpucount,100.*(double)gpucount/j,(uint32_t)time(NULL),roundrobin_delay); + if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 ) + fprintf(stderr," <- prev minerids from ht.%d notary.%d gpucount.%d %.2f%% t.%u %d\n",pindexPrev->nHeight,notaryid,gpucount,100.*(double)gpucount/j,(uint32_t)time(NULL),roundrobin_delay); } for (j=0; j<65; j++) if ( mids[j] == notaryid ) From 4fff8a632e7c4b80c7609fd2ea07fb106f579383 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Apr 2018 00:44:45 +0300 Subject: [PATCH 3/4] Add 56 and 57 for miners display --- src/miner.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index dace45ee4..b57144dbc 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -831,6 +831,9 @@ void static BitcoinMiner() j = 65; if ( (Mining_height >= 235300 && Mining_height < 236000) || (Mining_height % KOMODO_ELECTION_GAP) > 64 || (Mining_height % KOMODO_ELECTION_GAP) == 0 ) { + int32_t dispflag = 0; + if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 || notaryid == 56 || notaryid == 57 ) + dispflag = 1; komodo_eligiblenotary(pubkeys,mids,blocktimes,&nonzpkeys,pindexPrev->nHeight); if ( nonzpkeys > 0 ) { @@ -849,7 +852,7 @@ void static BitcoinMiner() printf("VIOLATION at %d, notaryid.%d\n",i,mids[i]); for (j=gpucount=0; j<65; j++) { - if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 ) + if ( dispflag != 0 ) { if ( mids[j] >= 0 ) fprintf(stderr,"%d ",mids[j]); @@ -868,7 +871,7 @@ void static BitcoinMiner() roundrobin_delay += ((delta * i) / 64) - delta; //fprintf(stderr,"delta.%f %f %f\n",delta,(double)(gpucount - j/3) / 2,(delta * i) / 64); } - if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 ) + if ( dispflag != 0 ) fprintf(stderr," <- prev minerids from ht.%d notary.%d gpucount.%d %.2f%% t.%u %d\n",pindexPrev->nHeight,notaryid,gpucount,100.*(double)gpucount/j,(uint32_t)time(NULL),roundrobin_delay); } for (j=0; j<65; j++) From 8f2def7895ff75504a7c2b2800c21c5d3eb7979f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Apr 2018 11:49:03 +0300 Subject: [PATCH 4/4] Update display notary --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index b57144dbc..445ea2dad 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -832,7 +832,7 @@ void static BitcoinMiner() if ( (Mining_height >= 235300 && Mining_height < 236000) || (Mining_height % KOMODO_ELECTION_GAP) > 64 || (Mining_height % KOMODO_ELECTION_GAP) == 0 ) { int32_t dispflag = 0; - if ( notaryid <= 3 || notaryid == 34 || notaryid == 51 || notaryid == 52 || notaryid == 56 || notaryid == 57 ) + if ( notaryid <= 3 || notaryid == 32 || (notaryid >= 43 && notaryid <= 45) &¬aryid == 51 || notaryid == 52 || notaryid == 56 || notaryid == 57 ) dispflag = 1; komodo_eligiblenotary(pubkeys,mids,blocktimes,&nonzpkeys,pindexPrev->nHeight); if ( nonzpkeys > 0 )