attempt simpler to crypto address function
This commit is contained in:
@@ -1597,7 +1597,6 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio
|
|||||||
|
|
||||||
CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
|
CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
|
||||||
{
|
{
|
||||||
extern int32_t KOMODO_ON_DEMAND;
|
|
||||||
{
|
{
|
||||||
LOCK(mempool.cs);
|
LOCK(mempool.cs);
|
||||||
uint256 hash = tx.GetHash();
|
uint256 hash = tx.GetHash();
|
||||||
@@ -1918,8 +1917,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||||||
KOMODO_CONNECTING = -1;
|
KOMODO_CONNECTING = -1;
|
||||||
|
|
||||||
// Store transaction in memory
|
// Store transaction in memory
|
||||||
if ( komodo_is_notarytx(tx) == 0 )
|
|
||||||
KOMODO_ON_DEMAND++;
|
|
||||||
pool.addUnchecked(hash, entry, !IsInitialBlockDownload());
|
pool.addUnchecked(hash, entry, !IsInitialBlockDownload());
|
||||||
|
|
||||||
if (!tx.IsCoinImport())
|
if (!tx.IsCoinImport())
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "komodo_defs.h"
|
#include "komodo_defs.h"
|
||||||
#define CRYPTO777_KMDADDR "RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA"
|
//#define CRYPTO777_KMDADDR "RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA"
|
||||||
|
|
||||||
extern CCriticalSection cs_metrics;
|
extern CCriticalSection cs_metrics;
|
||||||
extern int32_t KOMODO_MININGTHREADS,KOMODO_LONGESTCHAIN,ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE,KOMODO_PASSPORT_INITDONE;
|
extern int32_t KOMODO_MININGTHREADS,KOMODO_LONGESTCHAIN,ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE,KOMODO_PASSPORT_INITDONE;
|
||||||
@@ -272,12 +272,16 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
|
|||||||
nTotalIn += nValueIn;
|
nTotalIn += nValueIn;
|
||||||
dPriority += (double)nValueIn * 1000; // flat multiplier
|
dPriority += (double)nValueIn * 1000; // flat multiplier
|
||||||
} else {
|
} else {
|
||||||
// TODO: It will be much faster here to just compare scriptpubkey to the crypto pubkey!
|
int numNotaryVins = 0; bool fToCryptoAddress = false;
|
||||||
CTxDestination ToAddress; int numNotaryVins = 0; bool fToCryptoAddress = false;
|
if ( komodo_is_notarytx(tx) == 1 )
|
||||||
|
fToCryptoAddress = true;
|
||||||
|
|
||||||
|
/*CTxDestination ToAddress;
|
||||||
if (ExtractDestination(tx.vout[0].scriptPubKey, ToAddress)) {
|
if (ExtractDestination(tx.vout[0].scriptPubKey, ToAddress)) {
|
||||||
if ( strcmp(CRYPTO777_KMDADDR,CBitcoinAddress(ToAddress).ToString().c_str()) == 0 )
|
if ( strcmp(CRYPTO777_KMDADDR,CBitcoinAddress(ToAddress).ToString().c_str()) == 0 )
|
||||||
fToCryptoAddress = true;
|
fToCryptoAddress = true;
|
||||||
}
|
} */
|
||||||
|
|
||||||
BOOST_FOREACH(const CTxIn& txin, tx.vin)
|
BOOST_FOREACH(const CTxIn& txin, tx.vin)
|
||||||
{
|
{
|
||||||
// Read prev transaction
|
// Read prev transaction
|
||||||
|
|||||||
Reference in New Issue
Block a user