diff --git a/src/komodo.h b/src/komodo.h index 4c36f59a1..6b4661cda 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -194,7 +194,7 @@ void komodo_nutxoadd(int32_t notaryid,uint256 txhash,uint64_t voutmask,int32_t n } } -int32_t komodo_nutxofind(uint256 txhash,int32_t vout) +int32_t komodo_nutxofind(uint256 txhash,int32_t vout) // change to ADD_HASH() and file based { int32_t i; for (i=0; i= 0 ) { - printf("found notary.k%d\n",k); - if ( notaryid < 0 ) + //printf("found notary.k%d\n",k); + if ( notaryid < 64 ) { - notaryid = k; - *voutmaskp |= (1LL << j); + if ( notaryid < 0 ) + { + notaryid = k; + *voutmaskp |= (1LL << j); + } + else if ( notaryid != k ) + { + printf("mismatch notaryid.%d k.%d\n",notaryid,k); + notaryid = 64; + *voutmaskp = 0; + } + else *voutmaskp |= (1LL << j); } - else if ( notaryid != k ) - printf("mismatch notaryid.%d k.%d\n",notaryid,k); - else *voutmaskp |= (1LL << j); } } if ( j == 1 && scriptbuf[len++] == 0x6a ) @@ -314,6 +326,24 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) if ( signedmask != 0 && (notarizedheight != 0 || specialtx != 0) ) { printf("NOTARY SIGNED.%llx ht.%d txi.%d notaryht.%d specialtx.%d\n",(long long)signedmask,height,i,notarizedheight,specialtx); + if ( specialtx != 0 && komodo_threshold(signedmask) > 0 ) + { + for (j=1; j