Browse Source

remove PAX, fix mainnet MoMoM!

blackjok3r
blackjok3r 6 years ago
parent
commit
1ea195e01f
  1. 15
      iguana/dpow/dpow_rpc.c
  2. 6
      iguana/iguana_notary.c
  3. 4
      iguana/iguana_wallet.c

15
iguana/dpow/dpow_rpc.c

@ -303,7 +303,14 @@ int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsiz
free_json(srcinfojson);
//printf("ppMoMheight.%i CCid.%i\n", ppMoMheight, CCid);
} */
if ( CCid > 1 && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) //strncmp(bp->srccoin->symbol,"TXSCL",5) == 0 &&
#if STAKED
int8_t MoMoMdelay = 5;
int8_t ccid_ex = 1;
#else
int8_t MoMoMdelay = 0;
int8_t ccid_ex = 0;
#endif
if ( CCid > ccid_ex && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) //strncmp(bp->srccoin->symbol,"TXSCL",5) == 0 &&
{
kmdcoin = bp->destcoin;
if ( (infojson= dpow_getinfo(myinfo,kmdcoin)) != 0 )
@ -312,8 +319,8 @@ int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsiz
free_json(infojson);
}
// 5 block delay is easily enough most of the time. In rare case KMD is reorged more than this,
// the backup notary validation can be used to complete the import.
if ( (retjson= dpow_MoMoMdata(kmdcoin,bp->srccoin->symbol,kmdheight-5,bp->CCid)) != 0 )
// the backup notary validation can be used to complete the import.
if ( (retjson= dpow_MoMoMdata(kmdcoin,bp->srccoin->symbol,kmdheight-MoMoMdelay,bp->CCid)) != 0 )
{
/*if ( ppMoMheight != 0 && jstr(retjson,"error") != 0 )
{
@ -436,7 +443,7 @@ char *dpow_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin
printf("autochange %s validateaddress -> getaddressinfo\n",coin->symbol);
strcpy(coin->validateaddress,"getaddressinfo");
free_json(retjson);
free(retjson);
free(retstr);
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,coin->validateaddress,buf));
}
free_json(retjson);

6
iguana/iguana_notary.c

@ -436,9 +436,9 @@ THREE_STRINGS_AND_DOUBLE(iguana,dpow,symbol,dest,pubkey,freq)
dp->maxblocks = 100;
dp->blocks = calloc(dp->maxblocks,sizeof(*dp->blocks));
}
portable_mutex_init(&dp->paxmutex);
portable_mutex_init(&dp->dexmutex);
PAX_init();
//portable_mutex_init(&dp->paxmutex);
//portable_mutex_init(&dp->dexmutex);
//PAX_init();
dp->fullCCid = dpow_CCid(myinfo,src);
myinfo->numdpows++;
for (i=0; i<33; i++)

4
iguana/iguana_wallet.c

@ -1405,9 +1405,9 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout)
if ( (ismine= jobj(json,"ismine")) != 0 && is_cJSON_True(ismine) != 0 )
destvalid = 1;
else destvalid = 0;
free(ismine);
free_json(ismine);
free(tmpstr);
free(retjson);
free_json(retjson);
tmpstr = 0;
}
if ( destvalid == 0 )

Loading…
Cancel
Save