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) )
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;
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 )
{