diff --git a/basilisk/basilisk_bitcoin.c b/basilisk/basilisk_bitcoin.c index be78a05e2..302275323 100755 --- a/basilisk/basilisk_bitcoin.c +++ b/basilisk/basilisk_bitcoin.c @@ -593,6 +593,8 @@ char *iguana_utxoduplicates(struct supernet_info *myinfo,struct iguana_info *coi txfee = (coin->txfee + duplicates*coin->txfee/10); if ( strcmp(coin->symbol,"GAME") == 0 ) printf("GAME txfee %.8f\n",dstr(txfee)); + if ( strcmp(coin->symbol,"EMC2") == 0 ) + printf("EMC2 txfee %.8f\n",dstr(txfee)); if ( (txobj= bitcoin_txcreate(coin->symbol,coin->chain->isPoS,0,1,0)) != 0 ) { if ( duplicates <= 0 ) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index f4aeed7c6..bdfc579d6 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -235,7 +235,7 @@ bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct igu bits256 MoM; cJSON *MoMjson,*infojson; int32_t prevMoMheight; *MoMdepthp = 0; memset(MoM.bytes,0,sizeof(MoM)); - if ( strcmp(coin->symbol,"GAME") == 0 || strcmp(coin->symbol,"HUSH") == 0 ) // 80 byte OP_RETURN limit + if ( strcmp(coin->symbol,"GAME") == 0 || strcmp(coin->symbol,"HUSH") == 0 || strcmp(coin->symbol,"EMC2") == 0 ) // 80 byte OP_RETURN limit return(MoM); if ( (infojson= dpow_getinfo(myinfo,coin)) != 0 ) { diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index fb8300d80..9c7fd209f 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1988,8 +1988,8 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru { if ( bp->state != 0xffffffff ) dpow_sigscheck(myinfo,dp,bp,bp->myind,0,bp->pendingbestk,bp->pendingbestmask,0,0); - } // else if ( strcmp(dp->symbol,"CHIPS") == 0 || strcmp(dp->symbol,"GAME") == 0 )printf("srcmask.[%d:%d] %llx %llx != bestmask.%llx\n",bp->bestk,bp->pendingbestk,(long long)bp->srcsigsmasks[bp->pendingbestk],(long long)bp->srcsigsmasks[bp->bestk],(long long)bp->pendingbestmask); - } //else if ( strcmp(dp->symbol,"CHIPS") == 0 || strcmp(dp->symbol,"GAME") == 0 ) + } // else if ( strcmp(dp->symbol,"CHIPS") == 0 || strcmp(dp->symbol,"GAME") == 0 || strcmp(dp->symbol,"EMC2") == 0 )printf("srcmask.[%d:%d] %llx %llx != bestmask.%llx\n",bp->bestk,bp->pendingbestk,(long long)bp->srcsigsmasks[bp->pendingbestk],(long long)bp->srcsigsmasks[bp->bestk],(long long)bp->pendingbestmask); + } //else if ( strcmp(dp->symbol,"CHIPS") == 0 || strcmp(dp->symbol,"GAME") == 0 || strcmp(dp->symbol,"EMC2") == 0 ) //printf("destmask.%llx != bestmask.%llx\n",(long long)bp->destsigsmasks[bp->bestk],(long long)bp->bestmask); } } diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index 447de82bc..6fff2da72 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -17,7 +17,7 @@ uint64_t dpow_utxosize(char *symbol) { - if ( strcmp(symbol,"GAME") == 0 ) + if ( strcmp(symbol,"GAME") == 0 || strcmp(symbol,"EMC2") == 0) return(100000); else return(10000); } @@ -283,7 +283,7 @@ int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsiz { struct iguana_info *coin,*kmdcoin=0; char *retstr,*hexstr; cJSON *retjson,*infojson; int32_t kmdheight=0,hexlen=0,n=0; uint32_t paxwdcrc; paxwdcrc = 0; - if ( strcmp(bp->srccoin->symbol,"GAME") != 0 || src_or_dest != 0 ) + if ( strcmp(bp->srccoin->symbol,"GAME") != 0 || strcmp(bp->srccoin->symbol,"EMC2") != 0 || src_or_dest != 0 ) { n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes); MoMdepth = (MoMdepth & 0xffff) | ((uint32_t)CCid<<16); @@ -429,7 +429,7 @@ cJSON *dpow_getblock(struct supernet_info *myinfo,struct iguana_info *coin,bits2 int32_t dpow_is015(char *symbol) { - if ( strcmp("CHIPS",symbol) == 0 || strcmp("GAME",symbol) == 0 ) //strcmp("BTC",symbol) == 0 || + if ( strcmp("CHIPS",symbol) == 0 || strcmp("GAME",symbol) == 0 || strcmp("EMC2",symbol) == 0 ) //strcmp("BTC",symbol) == 0 || return(1); else return(0); } diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 040d9e873..51ba39f8b 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -581,7 +581,7 @@ void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo { dpow_notarytx(myinfo,bp->signedtx,&numsigs,coin->chain->isPoS,bp,bestk,bestmask,0,src_or_dest,pubkeys,numratified); // setcrcval signedtxid = dpow_notarytx(myinfo,bp->signedtx,&numsigs,coin->chain->isPoS,bp,bestk,bestmask,1,src_or_dest,pubkeys,numratified); - if ( strcmp("GAME",coin->symbol) == 0 ) + if ( strcmp("GAME",coin->symbol) == 0 || strcmp("EMC2",coin->symbol) == 0 ) printf("src_or_dest.%d bestk.%d %llx %s numsigs.%d signedtx.(%s)\n",src_or_dest,bestk,(long long)bestmask,bits256_str(str,signedtxid),numsigs,bp->signedtx); bp->state = 1; if ( bits256_nonz(signedtxid) != 0 && numsigs == bp->minsigs ) diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index 3c46ff1fb..8e3eb0e28 100755 --- a/iguana/iguana_wallet.c +++ b/iguana/iguana_wallet.c @@ -1432,7 +1432,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout) THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) { - char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_HUSH = 0,need_KMD = 0,need_BTC = 0,need_GAME = 0; + char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_HUSH = 0,need_KMD = 0,need_BTC = 0,need_GAME = 0,need_EMC2 = 0; if ( remoteaddr != 0 || coin == 0 ) return(clonestr("{\"error\":\"no remote encrypt or no coin\"}")); iguana_walletlock(myinfo,coin); @@ -1473,6 +1473,8 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) need_GAME = 1; if ( strcmp(coin->symbol,"HUSH") != 0 ) need_HUSH = 1; + if ( strcmp(coin->symbol,"EMC2") != 0 ) + need_EMC2 = 1; if ( need_KMD != 0 && (coin= iguana_coinfind("KMD")) != 0 ) { bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); @@ -1500,6 +1502,11 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); jaddstr(retjson,"GAMEwif",wifstr); } + if ( need_EMC2 != 0 && (coin= iguana_coinfind("EMC2")) != 0 ) + { + bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); + jaddstr(retjson,"EMC2wif",wifstr); + } /*if ( (dexstr= _dex_importaddress(myinfo,coin->symbol,waddr.coinaddr)) != 0 ) { if ( (dexjson= cJSON_Parse(dexstr)) != 0 )