Browse Source

Fix AddCClibtxfee

warmup
jl777 5 years ago
parent
commit
716e089fab
  1. 2
      src/cc/cclib.cpp
  2. 13
      src/init.cpp

2
src/cc/cclib.cpp

@ -542,7 +542,7 @@ int64_t AddCClibtxfee(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKe
char coinaddr[64]; int64_t nValue,txfee = 10000; uint256 txid,hashBlock; CTransaction vintx; int32_t vout;
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
GetCCaddress(cp,coinaddr,pk);
SetCCunspents(unspentOutputs,coinaddr,true);
SetCCunspents(unspentOutputs,coinaddr,false);
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
{
txid = it->first.txhash;

13
src/init.cpp

@ -1911,11 +1911,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
PruneAndFlush();
}
}
if ( GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX) != 0 )
nLocalServices |= NODE_ADDRINDEX;
if ( GetBoolArg("-spentindex", DEFAULT_SPENTINDEX) != 0 )
nLocalServices |= NODE_SPENTINDEX;
fprintf(stderr,"nLocalServices %llx %d, %d\n",(long long)nLocalServices,GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX),GetBoolArg("-spentindex", DEFAULT_SPENTINDEX));
if ( KOMODO_NSPV > 0 )
{
if ( GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX) != 0 )
nLocalServices |= NODE_ADDRINDEX;
if ( GetBoolArg("-spentindex", DEFAULT_SPENTINDEX) != 0 )
nLocalServices |= NODE_SPENTINDEX;
fprintf(stderr,"nLocalServices %llx %d, %d\n",(long long)nLocalServices,GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX),GetBoolArg("-spentindex", DEFAULT_SPENTINDEX));
}
// ********************************************************* Step 10: import blocks
if (mapArgs.count("-blocknotify"))

Loading…
Cancel
Save