diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 9377ea276..31dde4a24 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -85,5 +85,6 @@ int tx_height( const uint256 &hash ); extern std::vector vWhiteListAddress; void komodo_netevent(std::vector payload); int32_t komodo_priceind(char *symbol); +void komodo_pricesinit(); #endif diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9afc9845c..2098d30c2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -2526,3 +2526,19 @@ int64_t komodo_pricesmoothed(int64_t *correlated,int32_t cskip,int64_t *rawprice return(price); } +void komodo_pricesinit() +{ + FILE *fp; char symbol[65]; int32_t i; + boost::filesystem::path pricefname,pricesdir = GetDataDir() / "prices"; + if (!boost::filesystem::exists(pricesdir)) + { + boost::filesystem::create_directories(pricesdir); + for (i=0; i