16
.github/ISSUE_TEMPLATE.md
vendored
16
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,10 +1,8 @@
|
|||||||
<!--- Remove text and sections that do not apply -->
|
<!--- Remove text and sections that do not apply -->
|
||||||
|
|
||||||
This issue tracker is only for technical issues related to zcashd.
|
This issue tracker is only for technical issues related to komodod
|
||||||
|
|
||||||
General Zcash questions and/or support requests and are best directed to the [Zcash Forums](https://forum.z.cash) or [Community Rocket.Chat](https://chat.zcashcommunity.com).
|
General Komodo questions and/or support requests and are best directed to [Discord](https://komodoplatform.com/discord)
|
||||||
|
|
||||||
For reporting security vulnerabilities or for sensitive discussions with our security team, please contact [security@z.cash](mailto:security@z.cash). You can use the [GPG key](https://z.cash/gpg-pubkeys/security.asc) (fingerprint: `AF85 0445 546C 18B7 86F9 2C62 88FB 8B86 D8B5 A68C`) to send an encrypted message. The key and fingerprint are duplicated on our [Public Keys page](https://z.cash/support/pubkeys.html).
|
|
||||||
|
|
||||||
### Describe the issue
|
### Describe the issue
|
||||||
Please provide a general summary of the issue you're experiencing
|
Please provide a general summary of the issue you're experiencing
|
||||||
@@ -21,8 +19,8 @@ Tell us what should happen
|
|||||||
### Actual behaviour + errors
|
### Actual behaviour + errors
|
||||||
Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred)
|
Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred)
|
||||||
|
|
||||||
### The version of Zcash you were using:
|
### The version of Komodo you were using:
|
||||||
Run `zcashd --version` to find out
|
Run `komodod --version` to find out
|
||||||
|
|
||||||
### Machine specs:
|
### Machine specs:
|
||||||
- OS name + version:
|
- OS name + version:
|
||||||
@@ -34,9 +32,9 @@ Run `zcashd --version` to find out
|
|||||||
- Compiler version (gcc -version):
|
- Compiler version (gcc -version):
|
||||||
|
|
||||||
### Any extra information that might be useful in the debugging process.
|
### Any extra information that might be useful in the debugging process.
|
||||||
This includes the relevant contents of `~/.zcash/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
|
This includes the relevant contents of `~/.komodo/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
|
||||||
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.
|
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.
|
||||||
|
|
||||||
### Do you have a backup of `~/.zcash` directory and/or take a VM snapshot?
|
### Do you have a backup of `~/.komodo` directory and/or take a VM snapshot?
|
||||||
- Backing up / making a copy of the `~/.zcash` directory might help make the problem reproducible. Please redact appropriately.
|
- Backing up / making a copy of the `~/.komodo` directory might help make the problem reproducible. Please redact appropriately.
|
||||||
- Taking a VM snapshot is really helpful for interactively testing fixes
|
- Taking a VM snapshot is really helpful for interactively testing fixes
|
||||||
|
|||||||
@@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
#include "CCassets.h"
|
#include "CCassets.h"
|
||||||
|
|
||||||
// need allassets
|
|
||||||
// find asset
|
|
||||||
|
|
||||||
int64_t AddAssetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk,uint256 assetid,int64_t total,int32_t maxinputs)
|
int64_t AddAssetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk,uint256 assetid,int64_t total,int32_t maxinputs)
|
||||||
{
|
{
|
||||||
char coinaddr[64]; int64_t nValue,price,totalinputs = 0; uint256 txid,hashBlock; std::vector<uint8_t> origpubkey; CTransaction vintx; int32_t j,vout,n = 0;
|
char coinaddr[64]; int64_t nValue,price,totalinputs = 0; uint256 txid,hashBlock; std::vector<uint8_t> origpubkey; CTransaction vintx; int32_t j,vout,n = 0;
|
||||||
@@ -35,7 +32,7 @@ int64_t AddAssetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubK
|
|||||||
continue;
|
continue;
|
||||||
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
||||||
{
|
{
|
||||||
if ( (nValue= IsAssetvout(price,origpubkey,vintx,vout,assetid)) > 0 )
|
if ( (nValue= IsAssetvout(price,origpubkey,vintx,vout,assetid)) > 0 && myIsutxo_spentinmempool(txid,vout) == 0 )
|
||||||
{
|
{
|
||||||
if ( total != 0 && maxinputs != 0 )
|
if ( total != 0 && maxinputs != 0 )
|
||||||
mtx.vin.push_back(CTxIn(txid,vout,CScript()));
|
mtx.vin.push_back(CTxIn(txid,vout,CScript()));
|
||||||
|
|||||||
@@ -33,6 +33,13 @@
|
|||||||
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
|
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
|
||||||
typedef union _bits256 bits256;
|
typedef union _bits256 bits256;
|
||||||
|
|
||||||
|
struct CC_utxo
|
||||||
|
{
|
||||||
|
uint256 txid;
|
||||||
|
int64_t nValue;
|
||||||
|
int32_t vout;
|
||||||
|
};
|
||||||
|
|
||||||
struct CCcontract_info
|
struct CCcontract_info
|
||||||
{
|
{
|
||||||
uint256 prevtxid;
|
uint256 prevtxid;
|
||||||
|
|||||||
@@ -201,36 +201,124 @@ uint64_t CCutxovalue(char *coinaddr,uint256 utxotxid,int32_t utxovout)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CC_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t *belowp,struct CC_utxo utxos[],int32_t numunspents,uint64_t value)
|
||||||
|
{
|
||||||
|
int32_t i,abovei,belowi; int64_t above,below,gap,atx_value;
|
||||||
|
abovei = belowi = -1;
|
||||||
|
for (above=below=i=0; i<numunspents; i++)
|
||||||
|
{
|
||||||
|
if ( (atx_value= utxos[i].nValue) <= 0 )
|
||||||
|
continue;
|
||||||
|
if ( atx_value == value )
|
||||||
|
{
|
||||||
|
*aboveip = *belowip = i;
|
||||||
|
*abovep = *belowp = 0;
|
||||||
|
return(i);
|
||||||
|
}
|
||||||
|
else if ( atx_value > value )
|
||||||
|
{
|
||||||
|
gap = (atx_value - value);
|
||||||
|
if ( above == 0 || gap < above )
|
||||||
|
{
|
||||||
|
above = gap;
|
||||||
|
abovei = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gap = (value - atx_value);
|
||||||
|
if ( below == 0 || gap < below )
|
||||||
|
{
|
||||||
|
below = gap;
|
||||||
|
belowi = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//printf("value %.8f gap %.8f abovei.%d %.8f belowi.%d %.8f\n",dstr(value),dstr(gap),abovei,dstr(above),belowi,dstr(below));
|
||||||
|
}
|
||||||
|
*aboveip = abovei;
|
||||||
|
*abovep = above;
|
||||||
|
*belowip = belowi;
|
||||||
|
*belowp = below;
|
||||||
|
//printf("above.%d below.%d\n",abovei,belowi);
|
||||||
|
if ( abovei >= 0 && belowi >= 0 )
|
||||||
|
{
|
||||||
|
if ( above < (below >> 1) )
|
||||||
|
return(abovei);
|
||||||
|
else return(belowi);
|
||||||
|
}
|
||||||
|
else if ( abovei >= 0 )
|
||||||
|
return(abovei);
|
||||||
|
else return(belowi);
|
||||||
|
//return(abovei >= 0 && above < (below>>1) ? abovei : belowi);
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,uint64_t total,int32_t maxinputs)
|
uint64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,uint64_t total,int32_t maxinputs)
|
||||||
{
|
{
|
||||||
int32_t vout,j,n = 0; uint64_t nValue,totalinputs = 0; uint256 txid,hashBlock; std::vector<COutput> vecOutputs; CTransaction tx;
|
int32_t abovei,belowi,ind,vout,i,n = 0,maxutxos=1024; int64_t above,below; uint64_t remains,nValue,totalinputs = 0; uint256 txid,hashBlock; std::vector<COutput> vecOutputs; CTransaction tx; struct CC_utxo *utxos,*up;
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
const CKeyStore& keystore = *pwalletMain;
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
assert(pwalletMain != NULL);
|
assert(pwalletMain != NULL);
|
||||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
pwalletMain->AvailableCoins(vecOutputs, false, NULL, true);
|
pwalletMain->AvailableCoins(vecOutputs, false, NULL, true);
|
||||||
|
utxos = (struct CC_utxo *)calloc(maxutxos,sizeof(*utxos));
|
||||||
BOOST_FOREACH(const COutput& out, vecOutputs)
|
BOOST_FOREACH(const COutput& out, vecOutputs)
|
||||||
{
|
{
|
||||||
if ( out.fSpendable != 0 )
|
if ( out.fSpendable != 0 )
|
||||||
{
|
{
|
||||||
txid = out.tx->GetHash();
|
txid = out.tx->GetHash();
|
||||||
vout = out.i;
|
vout = out.i;
|
||||||
for (j=0; j<mtx.vin.size(); j++)
|
for (i=0; i<mtx.vin.size(); i++)
|
||||||
if ( txid == mtx.vin[j].prevout.hash && vout == mtx.vin[j].prevout.n )
|
if ( txid == mtx.vin[i].prevout.hash && vout == mtx.vin[i].prevout.n )
|
||||||
break;
|
break;
|
||||||
if ( j != mtx.vin.size() )
|
if ( i != mtx.vin.size() )
|
||||||
continue;
|
continue;
|
||||||
if ( myIsutxo_spentinmempool(txid,vout) == 0 )
|
if ( myIsutxo_spentinmempool(txid,vout) == 0 )
|
||||||
{
|
{
|
||||||
mtx.vin.push_back(CTxIn(txid,vout,CScript()));
|
up = &utxos[n++];
|
||||||
|
up->txid = txid;
|
||||||
|
up->nValue = out.tx->vout[out.i].nValue;
|
||||||
|
up->vout = vout;
|
||||||
|
/*mtx.vin.push_back(CTxIn(txid,vout,CScript()));
|
||||||
nValue = out.tx->vout[out.i].nValue;
|
nValue = out.tx->vout[out.i].nValue;
|
||||||
totalinputs += nValue;
|
totalinputs += nValue;
|
||||||
n++;
|
n++;
|
||||||
if ( totalinputs >= total || n >= maxinputs )
|
if ( totalinputs >= total || n >= maxinputs )
|
||||||
|
break;*/
|
||||||
|
if ( n >= maxutxos )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
remains = total;
|
||||||
|
for (i=0; i<maxinputs; i++)
|
||||||
|
{
|
||||||
|
below = above = 0;
|
||||||
|
abovei = belowi = -1;
|
||||||
|
if ( CC_vinselect(&abovei,&above,&belowi,&below,utxos,n,remains) < 0 )
|
||||||
|
{
|
||||||
|
printf("error finding unspent i.%d of %d, %.8f vs %.8f\n",i,n,(double)remains/COIN,(double)total/COIN);
|
||||||
|
free(utxos);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
if ( belowi < 0 || abovei >= 0 )
|
||||||
|
ind = abovei;
|
||||||
|
else ind = belowi;
|
||||||
|
if ( ind < 0 )
|
||||||
|
{
|
||||||
|
printf("error finding unspent i.%d of %d, %.8f vs %.8f, abovei.%d belowi.%d ind.%d\n",i,n,(double)remains/COIN,(double)total/COIN,abovei,belowi,ind);
|
||||||
|
free(utxos);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
up = &utxos[ind];
|
||||||
|
utxos[ind] = utxos[--n];
|
||||||
|
memset(&utxos[n],0,sizeof(utxos[n]));
|
||||||
|
mtx.vin.push_back(CTxIn(up->txid,up->vout,CScript()));
|
||||||
|
totalinputs += up->nValue;
|
||||||
|
remains -= up->nValue;
|
||||||
|
if ( totalinputs >= total || (i+1) >= maxinputs )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
free(utxos);
|
||||||
if ( totalinputs >= total )
|
if ( totalinputs >= total )
|
||||||
return(totalinputs);
|
return(totalinputs);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ bool AuctionExactAmounts(struct CCcontract_info *cp,Eval* eval,const CTransactio
|
|||||||
bool AuctionValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
bool AuctionValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
||||||
{
|
{
|
||||||
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
||||||
|
return(false); // reject any auction CC for now
|
||||||
numvins = tx.vin.size();
|
numvins = tx.vin.size();
|
||||||
numvouts = tx.vout.size();
|
numvouts = tx.vout.size();
|
||||||
preventCCvins = preventCCvouts = -1;
|
preventCCvins = preventCCvouts = -1;
|
||||||
|
|||||||
@@ -126,20 +126,21 @@ bool FaucetValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
|
|
||||||
uint64_t AddFaucetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk,uint64_t total,int32_t maxinputs)
|
uint64_t AddFaucetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk,uint64_t total,int32_t maxinputs)
|
||||||
{
|
{
|
||||||
char coinaddr[64]; uint64_t nValue,price,totalinputs = 0; uint256 txid,hashBlock; std::vector<uint8_t> origpubkey; CTransaction vintx; int32_t n = 0;
|
char coinaddr[64]; uint64_t nValue,price,totalinputs = 0; uint256 txid,hashBlock; std::vector<uint8_t> origpubkey; CTransaction vintx; int32_t vout,n = 0;
|
||||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||||
GetCCaddress(cp,coinaddr,pk);
|
GetCCaddress(cp,coinaddr,pk);
|
||||||
SetCCunspents(unspentOutputs,coinaddr);
|
SetCCunspents(unspentOutputs,coinaddr);
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
||||||
{
|
{
|
||||||
txid = it->first.txhash;
|
txid = it->first.txhash;
|
||||||
// prevent dup
|
vout = (int32_t)it->first.index;
|
||||||
|
// no need to prevent dup
|
||||||
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
||||||
{
|
{
|
||||||
if ( (nValue= IsFaucetvout(cp,vintx,(int32_t)it->first.index)) > 1000000 )
|
if ( (nValue= IsFaucetvout(cp,vintx,vout)) > 1000000 && myIsutxo_spentinmempool(txid,vout) == 0 )
|
||||||
{
|
{
|
||||||
if ( total != 0 && maxinputs != 0 )
|
if ( total != 0 && maxinputs != 0 )
|
||||||
mtx.vin.push_back(CTxIn(txid,(int32_t)it->first.index,CScript()));
|
mtx.vin.push_back(CTxIn(txid,vout,CScript()));
|
||||||
nValue = it->second.satoshis;
|
nValue = it->second.satoshis;
|
||||||
totalinputs += nValue;
|
totalinputs += nValue;
|
||||||
n++;
|
n++;
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ bool FSMExactAmounts(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
|||||||
bool FSMValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
bool FSMValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
||||||
{
|
{
|
||||||
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
||||||
|
return(false); // reject any FSM CC for now
|
||||||
numvins = tx.vin.size();
|
numvins = tx.vin.size();
|
||||||
numvouts = tx.vout.size();
|
numvouts = tx.vout.size();
|
||||||
preventCCvins = preventCCvouts = -1;
|
preventCCvins = preventCCvouts = -1;
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ bool LottoExactAmounts(struct CCcontract_info *cp,Eval* eval,const CTransaction
|
|||||||
bool LottoValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
bool LottoValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
||||||
{
|
{
|
||||||
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
int32_t numvins,numvouts,preventCCvins,preventCCvouts,i; bool retval;
|
||||||
|
return(false); // reject any lotto CC for now
|
||||||
numvins = tx.vin.size();
|
numvins = tx.vin.size();
|
||||||
numvouts = tx.vout.size();
|
numvouts = tx.vout.size();
|
||||||
preventCCvins = preventCCvouts = -1;
|
preventCCvins = preventCCvouts = -1;
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ uint64_t AddRewardsInputs(CScript &scriptPubKey,int32_t fundsflag,struct CCcontr
|
|||||||
break;
|
break;
|
||||||
if ( j != mtx.vin.size() )
|
if ( j != mtx.vin.size() )
|
||||||
continue;
|
continue;
|
||||||
if ( GetTransaction(txid,tx,hashBlock,false) != 0 && tx.vout.size() > 0 && tx.vout[vout].scriptPubKey.IsPayToCryptoCondition() != 0 )
|
if ( GetTransaction(txid,tx,hashBlock,false) != 0 && tx.vout.size() > 0 && tx.vout[vout].scriptPubKey.IsPayToCryptoCondition() != 0 && myIsutxo_spentinmempool(txid,vout) == 0 )
|
||||||
{
|
{
|
||||||
if ( (funcid= DecodeRewardsOpRet(txid,tx.vout[tx.vout.size()-1].scriptPubKey,sbits,fundingtxid)) != 0 )
|
if ( (funcid= DecodeRewardsOpRet(txid,tx.vout[tx.vout.size()-1].scriptPubKey,sbits,fundingtxid)) != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -568,9 +568,12 @@ public:
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
// These prefixes are the same as the testnet prefixes
|
// These prefixes are the same as the testnet prefixes
|
||||||
base58Prefixes[PUBKEY_ADDRESS] = {0x1D,0x25};
|
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,60);
|
||||||
base58Prefixes[SCRIPT_ADDRESS] = {0x1C,0xBA};
|
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,85);
|
||||||
base58Prefixes[SECRET_KEY] = {0xEF};
|
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,188);
|
||||||
|
//base58Prefixes[PUBKEY_ADDRESS] = {0x1D,0x25};
|
||||||
|
//base58Prefixes[SCRIPT_ADDRESS] = {0x1C,0xBA};
|
||||||
|
//base58Prefixes[SECRET_KEY] = {0xEF};
|
||||||
// do not rely on these BIP32 prefixes; they are not specified and may change
|
// do not rely on these BIP32 prefixes; they are not specified and may change
|
||||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04,0x35,0x87,0xCF};
|
base58Prefixes[EXT_PUBLIC_KEY] = {0x04,0x35,0x87,0xCF};
|
||||||
base58Prefixes[EXT_SECRET_KEY] = {0x04,0x35,0x83,0x94};
|
base58Prefixes[EXT_SECRET_KEY] = {0x04,0x35,0x83,0x94};
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ int32_t komodo_kvsearch(uint256 *pubkeyp,int32_t current_height,uint32_t *flagsp
|
|||||||
if ( (retval= ptr->valuesize) > 0 )
|
if ( (retval= ptr->valuesize) > 0 )
|
||||||
memcpy(value,ptr->value,retval);
|
memcpy(value,ptr->value,retval);
|
||||||
}
|
}
|
||||||
} else fprintf(stderr,"couldnt find (%s)\n",(char *)key);
|
} //else fprintf(stderr,"couldnt find (%s)\n",(char *)key);
|
||||||
portable_mutex_unlock(&KOMODO_KV_mutex);
|
portable_mutex_unlock(&KOMODO_KV_mutex);
|
||||||
if ( retval < 0 )
|
if ( retval < 0 )
|
||||||
{
|
{
|
||||||
@@ -172,7 +172,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
|
|||||||
memcpy(ptr->key,key,keylen);
|
memcpy(ptr->key,key,keylen);
|
||||||
newflag = 1;
|
newflag = 1;
|
||||||
HASH_ADD_KEYPTR(hh,KOMODO_KV,ptr->key,ptr->keylen,ptr);
|
HASH_ADD_KEYPTR(hh,KOMODO_KV,ptr->key,ptr->keylen,ptr);
|
||||||
fprintf(stderr,"KV add.(%s) (%s)\n",ptr->key,valueptr);
|
//fprintf(stderr,"KV add.(%s) (%s)\n",ptr->key,valueptr);
|
||||||
}
|
}
|
||||||
if ( newflag != 0 || (ptr->flags & KOMODO_KVPROTECTED) == 0 )
|
if ( newflag != 0 || (ptr->flags & KOMODO_KVPROTECTED) == 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,9 +103,10 @@ static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60;
|
|||||||
static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
|
static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
|
||||||
|
|
||||||
//static const bool DEFAULT_ADDRESSINDEX = false;
|
//static const bool DEFAULT_ADDRESSINDEX = false;
|
||||||
|
//static const bool DEFAULT_SPENTINDEX = false;
|
||||||
#define DEFAULT_ADDRESSINDEX (GetArg("-ac_cc",0) != 0)
|
#define DEFAULT_ADDRESSINDEX (GetArg("-ac_cc",0) != 0)
|
||||||
|
#define DEFAULT_SPENTINDEX (GetArg("-ac_cc",0) != 0)
|
||||||
static const bool DEFAULT_TIMESTAMPINDEX = false;
|
static const bool DEFAULT_TIMESTAMPINDEX = false;
|
||||||
static const bool DEFAULT_SPENTINDEX = false;
|
|
||||||
static const unsigned int DEFAULT_DB_MAX_OPEN_FILES = 1000;
|
static const unsigned int DEFAULT_DB_MAX_OPEN_FILES = 1000;
|
||||||
static const bool DEFAULT_DB_COMPRESSION = true;
|
static const bool DEFAULT_DB_COMPRESSION = true;
|
||||||
|
|
||||||
|
|||||||
@@ -4837,6 +4837,8 @@ int32_t ensure_CCrequirements()
|
|||||||
return(-1);
|
return(-1);
|
||||||
else if ( GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX) == 0 )
|
else if ( GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX) == 0 )
|
||||||
return(-1);
|
return(-1);
|
||||||
|
else if ( GetBoolArg("-spentindex", DEFAULT_SPENTINDEX) == 0 )
|
||||||
|
return(-1);
|
||||||
else return(0);
|
else return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user