Browse Source

Test

etomic
jl777 8 years ago
parent
commit
d1220393b7
  1. 2
      iguana/dPoW.h
  2. 1
      iguana/exchanges/LP_nativeDEX.c
  3. 1
      iguana/exchanges/LP_ordermatch.c
  4. 3
      iguana/iguana_notary.c

2
iguana/dPoW.h

@ -134,7 +134,7 @@ struct dpow_info
struct dpow_checkpoint checkpoint,last,destchaintip,srcfifo[DPOW_FIFOSIZE],destfifo[DPOW_FIFOSIZE];
struct dpow_hashheight approved[DPOW_FIFOSIZE],notarized[DPOW_FIFOSIZE];
bits256 activehash,lastnotarized,srctx[DPOW_MAXTX],desttx[DPOW_MAXTX];
uint32_t SRCREALTIME,destupdated,srcconfirms,numdesttx,numsrctx,lastsplit,cancelratify;
uint32_t SRCREALTIME,lastsrcupdate,destupdated,srcconfirms,numdesttx,numsrctx,lastsplit,cancelratify;
int32_t lastheight,maxblocks,SRCHEIGHT,SHORTFLAG,ratifying;
struct pax_transaction *PAX;
portable_mutex_t paxmutex,dexmutex;

1
iguana/exchanges/LP_nativeDEX.c

@ -18,7 +18,6 @@
// LP_nativeDEX.c
// marketmaker
//
// error if alice submits order too fast
// dPoW security -> 4: KMD notarized, 5: BTC notarized
// new testchain
// sign critical api calls (pubkey reg, listunspent, orders?)

1
iguana/exchanges/LP_ordermatch.c

@ -816,6 +816,7 @@ void LP_reserved(void *ctx,char *myipaddr,int32_t mypubsock,struct LP_quoteinfo
{
memset(&LP_Alicequery,0,sizeof(LP_Alicequery));
LP_Alicemaxprice = 0.;
Alice_expiration = 0;
LP_query(ctx,myipaddr,mypubsock,"connect",qp);
}
}

3
iguana/iguana_notary.c

@ -318,11 +318,12 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
dpow_srcupdate(myinfo,dp,dp->lastheight++,blockhash,(uint32_t)time(NULL),blocktime);
}
}
else
else if ( time(NULL) > dp->lastsrcupdate+60 )
{
dp->lastheight = height;
blockhash = dpow_getblockhash(myinfo,src,dp->lastheight);
dpow_srcupdate(myinfo,dp,dp->lastheight,blockhash,(uint32_t)time(NULL),blocktime);
dp->lastsrcupdate = (uint32_t)time(NULL);
}
} //else printf("error getchaintip for %s\n",dp->symbol);
} else printf("iguana_dPoWupdate missing src.(%s) %p or dest.(%s) %p\n",dp->symbol,src,dp->dest,dest);

Loading…
Cancel
Save