@@ -16,6 +16,10 @@
|
|||||||
#ifndef H_KOMODO_H
|
#ifndef H_KOMODO_H
|
||||||
#define H_KOMODO_H
|
#define H_KOMODO_H
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define printf(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Todo:
|
// Todo:
|
||||||
// verify: reorgs
|
// verify: reorgs
|
||||||
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ void komodo_paxpricefeed(int32_t height,uint8_t *pricefeed,int32_t opretlen)
|
|||||||
numpvals = dpow_readprices(height,pricefeed,×tamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
|
numpvals = dpow_readprices(height,pricefeed,×tamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
|
||||||
memset(&zero,0,sizeof(zero));
|
memset(&zero,0,sizeof(zero));
|
||||||
komodo_stateupdate(height,0,0,0,zero,0,0,pvals,numpvals,0,0,0,0,0,0);
|
komodo_stateupdate(height,0,0,0,zero,0,0,pvals,numpvals,0,0,0,0,0,0);
|
||||||
if ( 1 )
|
if ( 0 )
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
for (i=0; i<numpvals; i++)
|
for (i=0; i<numpvals; i++)
|
||||||
|
|||||||
@@ -525,6 +525,22 @@ char *bitcoin_address(char *coinaddr,uint8_t addrtype,uint8_t *pubkey_or_rmd160,
|
|||||||
//uint32_t komodo_interest_args(int32_t *txheightp,uint32_t *tiptimep,uint64_t *valuep,uint256 hash,int32_t n);
|
//uint32_t komodo_interest_args(int32_t *txheightp,uint32_t *tiptimep,uint64_t *valuep,uint256 hash,int32_t n);
|
||||||
int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width);
|
int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width);
|
||||||
int32_t komodo_kvsearch(uint256 *refpubkeyp,int32_t current_height,uint32_t *flagsp,int32_t *heightp,uint8_t value[IGUANA_MAXSCRIPTSIZE],uint8_t *key,int32_t keylen);
|
int32_t komodo_kvsearch(uint256 *refpubkeyp,int32_t current_height,uint32_t *flagsp,int32_t *heightp,uint8_t value[IGUANA_MAXSCRIPTSIZE],uint8_t *key,int32_t keylen);
|
||||||
|
/*uint64_t conv_NXTpassword(unsigned char *mysecret,unsigned char *mypublic,uint8_t *pass,int32_t passlen);
|
||||||
|
|
||||||
|
|
||||||
|
UniValue passphrasewif(const UniValue& params, bool fHelp)
|
||||||
|
{
|
||||||
|
UniValue ret(UniValue::VOBJ); char *passphrase,wifstr[64],coinaddr[64]; uint8_t tmptype,pubkey33[33]; void *ctx; uint256 privkey,pubkey;
|
||||||
|
passphrase = params[0].get_str().c_str();
|
||||||
|
conv_NXTpassword((void *)&privkey,(void *)&pubkey,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
|
||||||
|
ctx = bitcoin_ctx();
|
||||||
|
bitcoin_priv2pub(ctx,pubkey33,coinaddr,privkey,0,60);
|
||||||
|
bitcoin_priv2wif(0,wifstr,privkey,188);
|
||||||
|
free(ctx);
|
||||||
|
ret.push_back(Pair("address",coinaddr));
|
||||||
|
ret.push_back(Pair("wif",wifstr));
|
||||||
|
return ret;
|
||||||
|
}*/
|
||||||
|
|
||||||
UniValue kvsearch(const UniValue& params, bool fHelp)
|
UniValue kvsearch(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -604,7 +604,14 @@ boost::filesystem::path GetConfigFile()
|
|||||||
char confname[512];
|
char confname[512];
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
sprintf(confname,"%s.conf",ASSETCHAINS_SYMBOL);
|
sprintf(confname,"%s.conf",ASSETCHAINS_SYMBOL);
|
||||||
else strcpy(confname,"komodo.conf");
|
else
|
||||||
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
strcpy(confname,"Komodo.conf");
|
||||||
|
#else
|
||||||
|
strcpy(confname,"komodo.conf");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
boost::filesystem::path pathConfigFile(GetArg("-conf",confname));
|
boost::filesystem::path pathConfigFile(GetArg("-conf",confname));
|
||||||
if (!pathConfigFile.is_complete())
|
if (!pathConfigFile.is_complete())
|
||||||
pathConfigFile = GetDataDir(false) / pathConfigFile;
|
pathConfigFile = GetDataDir(false) / pathConfigFile;
|
||||||
|
|||||||
Reference in New Issue
Block a user