if TESTMODE PRICES_DAYWINDOW=3

This commit is contained in:
dimxy
2019-04-21 21:01:02 +05:00
parent 82c6560374
commit efec12bcf5
3 changed files with 10 additions and 1 deletions

View File

@@ -17,10 +17,11 @@
#ifndef CC_PRICES_H #ifndef CC_PRICES_H
#define CC_PRICES_H #define CC_PRICES_H
#include "komodo_defs.h"
#include "CCinclude.h" #include "CCinclude.h"
int32_t komodo_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks); int32_t komodo_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks);
#define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1) // #define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1) // defined in komodo_defs.h
#define PRICES_TXFEE 10000 #define PRICES_TXFEE 10000
#define PRICES_MAXLEVERAGE 777 #define PRICES_MAXLEVERAGE 777
#define PRICES_SMOOTHWIDTH 1 #define PRICES_SMOOTHWIDTH 1

View File

@@ -1102,6 +1102,9 @@ UniValue PricesInfo(uint256 bettxid, int32_t refheight)
result.push_back(Pair("costbasistxid", costbasistxid.GetHex())); result.push_back(Pair("costbasistxid", costbasistxid.GetHex()));
prices_betjson(result, profits, costbasis, positionsize, addedbets, leverage, firstheight, firstprice, lastprice, equity); prices_betjson(result, profits, costbasis, positionsize, addedbets, leverage, firstheight, firstprice, lastprice, equity);
result.push_back(Pair("height", (int64_t)refheight)); result.push_back(Pair("height", (int64_t)refheight));
#ifdef TESTMODE
result.push_back(Pair("test_daywindow", PRICES_DAYWINDOW));
#endif
return(result); return(result);
} }
} }

View File

@@ -38,7 +38,12 @@
#define KOMODO_MAXNVALUE (((uint64_t)1 << 63) - 1) #define KOMODO_MAXNVALUE (((uint64_t)1 << 63) - 1)
#define KOMODO_BIT63SET(x) ((x) & ((uint64_t)1 << 63)) #define KOMODO_BIT63SET(x) ((x) & ((uint64_t)1 << 63))
#define KOMODO_VALUETOOBIG(x) ((x) > (uint64_t)10000000001*COIN) #define KOMODO_VALUETOOBIG(x) ((x) > (uint64_t)10000000001*COIN)
#ifndef TESTMODE
#define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1) #define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1)
#else
#define PRICES_DAYWINDOW (3)
#endif
extern uint8_t ASSETCHAINS_TXPOW,ASSETCHAINS_PUBLIC; extern uint8_t ASSETCHAINS_TXPOW,ASSETCHAINS_PUBLIC;
int32_t MAX_BLOCK_SIZE(int32_t height); int32_t MAX_BLOCK_SIZE(int32_t height);