Browse Source

Custom reversion support

etomic
jl777 7 years ago
parent
commit
127bfdd9ae
  1. 3
      iguana/exchanges/LP_coins.c
  2. 2
      iguana/exchanges/LP_include.h
  3. 4
      iguana/exchanges/LP_transaction.c
  4. 2
      iguana/exchanges/coins
  5. 2
      iguana/exchanges/coins.json

3
iguana/exchanges/LP_coins.c

@ -354,6 +354,9 @@ uint16_t LP_coininit(struct iguana_info *coin,char *symbol,char *name,char *asse
char *name2;
memset(coin,0,sizeof(*coin));
safecopy(coin->symbol,symbol,sizeof(coin->symbol));
if ( strcmp(symbol,"PART") == 0 )
coin->txversion = 160;
else coin->txversion = 1;
coin->updaterate = (uint32_t)time(NULL);
coin->isPoS = isPoS;
coin->taddr = taddr;

2
iguana/exchanges/LP_include.h

@ -296,7 +296,7 @@ struct iguana_info
portable_mutex_t txmutex,addrmutex; struct LP_transaction *transactions; struct LP_address *addresses;
uint64_t txfee;
int32_t numutxos,notarized,longestchain,firstrefht,firstscanht,lastscanht,bussock,height; uint16_t busport;
uint32_t dPoWtime,loadedcache,electrumlist,lastunspent,importedprivkey,lastpushtime,lastutxosync,addr_listunspent_requested,lastutxos,updaterate,counter,inactive,lastmempool,lastgetinfo,ratetime,heighttime,lastmonitor,obooktime;
uint32_t txversion,dPoWtime,loadedcache,electrumlist,lastunspent,importedprivkey,lastpushtime,lastutxosync,addr_listunspent_requested,lastutxos,updaterate,counter,inactive,lastmempool,lastgetinfo,ratetime,heighttime,lastmonitor,obooktime;
uint8_t pubtype,p2shtype,isPoS,wiftype,wiftaddr,taddr,noimportprivkey_flag,userconfirms,isassetchain,maxconfirms;
char symbol[128],smartaddr[64],userpass[1024],serverport[128],instantdex_address[64];
// portfolio

4
iguana/exchanges/LP_transaction.c

@ -835,7 +835,7 @@ char *basilisk_swap_bobtxspend(bits256 *signedtxidp,uint64_t txfee,char *name,ch
V[0].ignore_cltverr = ignore_cltverr;
if ( redeemlen != 0 )
memcpy(V[0].p2shscript,redeemscript,redeemlen), V[0].p2shlen = redeemlen;
txobj = bitcoin_txcreate(symbol,isPoS,locktime,1,timestamp);
txobj = bitcoin_txcreate(symbol,isPoS,locktime,coin->txversion,timestamp);
vins = cJSON_CreateArray();
item = cJSON_CreateObject();
if ( userdata != 0 && userdatalen > 0 )
@ -1243,7 +1243,7 @@ char *LP_createrawtransaction(cJSON **txobjp,int32_t *numvinsp,struct iguana_inf
timestamp = (uint32_t)time(NULL);
if ( locktime == 0 && strcmp("KMD",coin->symbol) == 0 )
locktime = timestamp - 777;
txobj = bitcoin_txcreate(coin->symbol,coin->isPoS,locktime,1,timestamp);
txobj = bitcoin_txcreate(coin->symbol,coin->isPoS,locktime,coin->txversion,timestamp);
jdelete(txobj,"vin");
jadd(txobj,"vin",jduplicate(vins));
printf("change %.8f = total %.8f - amount %.8f, adjust %.8f numvouts.%d\n",dstr(change),dstr(total),dstr(amount),dstr(adjust),numvouts);

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

2
iguana/exchanges/coins.json

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save