CC fixes for nSPV and others (#30)
- Remove adding txfee inputs for gateways claim - FULLNODE and SUPERLITE macros - Filter SetCCtxids with txid from oprert - Fix for nServices of fullnode - Use SetCCtxids_nSPV for some more CCs - Fix addnormalinputs and add checking if utxo spent in mempool
This commit is contained in:
committed by
GitHub
parent
450ac5c5ea
commit
a7204d9f85
@@ -396,7 +396,7 @@ bool NSPV_inmempool(uint256 txid);
|
||||
bool myIsutxo_spentinmempool(uint256 &spenttxid,int32_t &spentvini,uint256 txid,int32_t vout)
|
||||
{
|
||||
int32_t vini = 0;
|
||||
if ( KOMODO_NSPV > 0 )
|
||||
if ( KOMODO_NSPV_SUPERLITE )
|
||||
return(NSPV_spentinmempool(spenttxid,spentvini,txid,vout));
|
||||
BOOST_FOREACH(const CTxMemPoolEntry &e,mempool.mapTx)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ bool myIsutxo_spentinmempool(uint256 &spenttxid,int32_t &spentvini,uint256 txid,
|
||||
|
||||
bool mytxid_inmempool(uint256 txid)
|
||||
{
|
||||
if ( KOMODO_NSPV > 0 )
|
||||
if ( KOMODO_NSPV_SUPERLITE )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
||||
obj.push_back(Pair("prevMoMheight", prevMoMheight));
|
||||
obj.push_back(Pair("notarizedhash", notarized_hash.ToString()));
|
||||
obj.push_back(Pair("notarizedtxid", notarized_desttxid.ToString()));
|
||||
if ( KOMODO_NSPV <= 0 )
|
||||
if ( KOMODO_NSPV_FULLNODE )
|
||||
{
|
||||
txid_height = notarizedtxid_height(ASSETCHAINS_SYMBOL[0] != 0 ? (char *)"KMD" : (char *)"BTC",(char *)notarized_desttxid.ToString().c_str(),&kmdnotarized_height);
|
||||
if ( txid_height > 0 )
|
||||
|
||||
@@ -374,7 +374,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
|
||||
const CTxOut& txout = tx.vout[i];
|
||||
UniValue out(UniValue::VOBJ);
|
||||
out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
|
||||
if ( KOMODO_NSPV <= 0 && ASSETCHAINS_SYMBOL[0] == 0 && tx.nLockTime >= 500000000 && (tipindex= chainActive.LastTip()) != 0 )
|
||||
if ( KOMODO_NSPV_FULLNODE && ASSETCHAINS_SYMBOL[0] == 0 && tx.nLockTime >= 500000000 && (tipindex= chainActive.LastTip()) != 0 )
|
||||
{
|
||||
int64_t interest; int32_t txheight; uint32_t locktime;
|
||||
interest = komodo_accrued_interest(&txheight,&locktime,tx.GetHash(),i,0,txout.nValue,(int32_t)tipindex->GetHeight());
|
||||
@@ -1366,7 +1366,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
|
||||
bool fOverrideFees = false;
|
||||
if (params.size() > 1)
|
||||
fOverrideFees = params[1].get_bool();
|
||||
if ( KOMODO_NSPV <= 0 )
|
||||
if ( KOMODO_NSPV_FULLNODE )
|
||||
{
|
||||
CCoinsViewCache &view = *pcoinsTip;
|
||||
const CCoins* existingCoins = view.AccessCoins(hashTx);
|
||||
|
||||
Reference in New Issue
Block a user