//CBlockIndex *komodo_getblockindex(uint256 hash); //moved to komodo_def.h
//int32_t hush_nextheight(); //moved to komodo_def.h
/// CCgetspenttxid finds the txid of the transaction which spends a transaction output. The function does this without loading transactions from the chain, by using spent index
/// CCgetspenttxid finds the txid of the transaction which spends a transaction output. The function does this without loading transactions from the chain, by using spent index
/// @param[out] spenttxid transaction id of the spending transaction
/// @param[out] spenttxid transaction id of the spending transaction
// int32_t komodo_blockload(CBlock& block,CBlockIndex *pindex); // this def in hush_defs.h
/// Makes opreturn scriptPubKey for token creation transaction. Normally this function is called internally by the tokencreate rpc. You might need to call this function to create a customized token.
/// Makes opreturn scriptPubKey for token creation transaction. Normally this function is called internally by the tokencreate rpc. You might need to call this function to create a customized token.
/// The total opreturn length should not exceed 10001 byte
/// The total opreturn length should not exceed 10001 byte
fprintf(stderr,"ERROR: komodo_checkcommission vsize.%d height.%d commission %.8f has checktoshis=%lu <10000 or less than 2 vouts (vouts=%lu)\n",(int32_t)pblock->vtx[0].vout.size(),height,(double)checktoshis/COIN,checktoshis,pblock->vtx[0].vout.size());
fprintf(stderr,"ERROR: hush_checkcommission vsize.%d height.%d commission %.8f has checktoshis=%lu <10000 or less than 2 vouts (vouts=%lu)\n",(int32_t)pblock->vtx[0].vout.size(),height,(double)checktoshis/COIN,checktoshis,pblock->vtx[0].vout.size());
strUsage+=HelpMessageOpt("-peerbloomfilters",strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"),1));
strUsage+=HelpMessageOpt("-peerbloomfilters",strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"),1));
if(showDebug)
if(showDebug)
strUsage+=HelpMessageOpt("-enforcenodebloom",strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)",0));
strUsage+=HelpMessageOpt("-enforcenodebloom",strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)",0));
strUsage+=HelpMessageOpt("-port=<port>",strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"),7770,17770));
strUsage+=HelpMessageOpt("-port=<port>",strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"),55555,55420));
strUsage+=HelpMessageOpt("-proxy=<ip:port>",_("Connect through SOCKS5 proxy"));
strUsage+=HelpMessageOpt("-proxy=<ip:port>",_("Connect through SOCKS5 proxy"));
strUsage+=HelpMessageOpt("-proxyrandomize",strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"),1));
strUsage+=HelpMessageOpt("-proxyrandomize",strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"),1));
strUsage+=HelpMessageOpt("-seednode=<ip>",_("Connect to a node to retrieve peer addresses, and disconnect"));
strUsage+=HelpMessageOpt("-seednode=<ip>",_("Connect to a node to retrieve peer addresses, and disconnect"));
strUsage+=HelpMessageOpt("-timeout=<n>",strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"),DEFAULT_CONNECT_TIMEOUT));
strUsage+=HelpMessageOpt("-timeout=<n>",strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"),DEFAULT_CONNECT_TIMEOUT));
strUsage+=HelpMessageOpt("-torcontrol=<ip>:<port>",strprintf(_("Tor control port to use if onion listening enabled (default: %s)"),DEFAULT_TOR_CONTROL));
strUsage+=HelpMessageOpt("-torcontrol=<ip>:<port>",strprintf(_("Tor control port to use if onion listening enabled (default: %s)"),DEFAULT_TOR_CONTROL));
strUsage+=HelpMessageOpt("-torpassword=<pass>",_("Tor control port password (default: empty)"));
strUsage+=HelpMessageOpt("-torpassword=<pass>",_("Tor control port password (default: empty)"));
strUsage+=HelpMessageOpt("-tls=<option>",_("Specify TLS usage (default: 1 => enabled and preferred, yet compatible); other options are -tls=0 to disable TLS and -tls=only to enforce it"));
strUsage+=HelpMessageOpt("-tls=<option>",_("Specify TLS usage (default: 1 => enabled and required); Cannot be turned off."));
strUsage+=HelpMessageOpt("-tlsfallbacknontls=<0 or 1>",_("If a TLS connection fails, the next connection attempt of the same peer (based on IP address) takes place without TLS (default: 1)"));
strUsage+=HelpMessageOpt("-tlsvalidate=<0 or 1>",_("Connect to peers only with valid certificates (default: 0)"));
strUsage+=HelpMessageOpt("-tlsvalidate=<0 or 1>",_("Connect to peers only with valid certificates (default: 0)"));
strUsage+=HelpMessageOpt("-tlskeypath=<path>",_("Full path to a private key"));
strUsage+=HelpMessageOpt("-tlskeypath=<path>",_("Full path to a private key"));
strUsage+=HelpMessageOpt("-tlskeypwd=<password>",_("Password for a private key encryption (default: not set, i.e. private key will be stored unencrypted)"));
strUsage+=HelpMessageOpt("-tlskeypwd=<password>",_("Password for a private key encryption (default: not set, i.e. private key will be stored unencrypted)"));
if(it->second!=0)// vNodes.size() >= KOMODO_LIMITED_NETWORKSIZE, change behavior to allow komodo_ensure to work
if(it->second!=0)// vNodes.size() >= HUSH_LIMITED_NETWORKSIZE, change behavior to allow komodo_ensure to work
{
{
// this is the strange case where somehow the hash is in the mapBlockIndex via as yet undetermined process, but the pindex for the hash is not there. Theoretically it is due to processing the block headers, but I have seen it get this case without having received it from the block headers or anywhere else... jl777
// this is the strange case where somehow the hash is in the mapBlockIndex via as yet undetermined process, but the pindex for the hash is not there. Theoretically it is due to processing the block headers, but I have seen it get this case without having received it from the block headers or anywhere else... jl777
//fprintf(stderr,"addtoblockindex already there %p\n",it->second);
//fprintf(stderr,"addtoblockindex already there %p\n",it->second);