]> Git Repo - VerusCoin.git/commitdiff
test
authorjl777 <[email protected]>
Mon, 16 Jan 2017 10:46:04 +0000 (12:46 +0200)
committerjl777 <[email protected]>
Mon, 16 Jan 2017 10:46:04 +0000 (12:46 +0200)
src/komodo.h
src/komodo_bitcoind.h

index 39a40ca02b87957cb9123ed22acdd5d6ecf0653d..29f7ecb26c2cc02cbe520dd729cd3ef9a41c8797 100644 (file)
@@ -302,7 +302,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
         else if ( height != 0 )
         {
             //printf("ht.%d func N ht.%d errs.%d\n",height,NOTARIZED_HEIGHT,errs);
-            if ( sp != 0 && (height < sp->CURRENT_HEIGHT-1000 || komodo_verifynotarization(symbol,dest,height,sp->NOTARIZED_HEIGHT,sp->NOTARIZED_HASH,sp->NOTARIZED_DESTTXID) == 0) )
+            if ( sp != 0 )
             {
                 fputc('N',fp);
                 if ( fwrite(&height,1,sizeof(height),fp) != sizeof(height) )
@@ -376,7 +376,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
             len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&kmdtxid);
             len += iguana_rwnum(0,&scriptbuf[len],sizeof(*notarizedheightp),(uint8_t *)notarizedheightp);
             len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&desttxid);
-            if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height )
+            if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height && (height < sp->CURRENT_HEIGHT-1000 || komodo_verifynotarization(symbol,dest,height,*notarizedheightp,kmdtxid,desttxid) == 0) )
             {
                 sp->NOTARIZED_HEIGHT = *notarizedheightp;
                 sp->NOTARIZED_HASH = kmdtxid;
index 165cc0657135ffe10e38f484c4144df3db2ddf87..9031d89c1b72d1501b632399ad16848491dde261 100644 (file)
@@ -368,9 +368,17 @@ int32_t komodo_verifynotarization(char *symbol,char *dest,int32_t height,int32_t
     char params[256],*jsonstr,*hexstr; uint8_t script[8192]; int32_t n,len,retval = -1; cJSON *txjson,*vouts,*vout,*skey;
     sprintf(params,"[\"%s\", 1]",NOTARIZED_DESTTXID.ToString().c_str());
     if ( strcmp(dest,"KMD") == 0 )
-        jsonstr = komodo_issuemethod(KMDUSERPASS,(char *)"getrawtransaction",params,7771);
+    {
+        if ( KMDUSERPASS[0] != 0 )
+            jsonstr = komodo_issuemethod(KMDUSERPASS,(char *)"getrawtransaction",params,7771);
+        //else jsonstr = _dex_getrawtransaction();
+    }
     else if ( strcmp(dest,"BTC") == 0 )
-        jsonstr = komodo_issuemethod(BTCUSERPASS,(char *)"getrawtransaction",params,8332);
+    {
+        if ( BTCUSERPASS[0] != 0 )
+            jsonstr = komodo_issuemethod(BTCUSERPASS,(char *)"getrawtransaction",params,8332);
+        //else jsonstr = _dex_getrawtransaction();
+    }
     else return(-1);
     if ( jsonstr != 0 )
     {
This page took 0.031184 seconds and 4 git commands to generate.