This commit is contained in:
jl777
2018-11-02 02:14:53 -11:00
parent 74bb69faef
commit 62259bc366

View File

@@ -194,7 +194,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight, nLockTimeCutoff) || IsExpiredTx(tx, nHeight)) if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight, nLockTimeCutoff) || IsExpiredTx(tx, nHeight))
{ {
//fprintf(stderr,"coinbase.%d finaltx.%d expired.%d\n",tx.IsCoinBase(),IsFinalTx(tx, nHeight, nLockTimeCutoff),IsExpiredTx(tx, nHeight)); fprintf(stderr,"coinbase.%d finaltx.%d expired.%d\n",tx.IsCoinBase(),IsFinalTx(tx, nHeight, nLockTimeCutoff),IsExpiredTx(tx, nHeight));
continue; continue;
} }
if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_validate_interest(tx,nHeight,(uint32_t)pblock->nTime,0) < 0 ) if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_validate_interest(tx,nHeight,(uint32_t)pblock->nTime,0) < 0 )
@@ -272,7 +272,10 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
porphan->feeRate = feeRate; porphan->feeRate = feeRate;
} }
else else
{
vecPriority.push_back(TxPriority(dPriority, feeRate, &(mi->GetTx()))); vecPriority.push_back(TxPriority(dPriority, feeRate, &(mi->GetTx())));
fprintf(stderr,".");
}
} }
// Collect transactions into block // Collect transactions into block
@@ -299,7 +302,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
if (nBlockSize + nTxSize >= nBlockMaxSize-512) // room for extra autotx if (nBlockSize + nTxSize >= nBlockMaxSize-512) // room for extra autotx
{ {
//fprintf(stderr,"nBlockSize %d + %d nTxSize >= %d nBlockMaxSize\n",(int32_t)nBlockSize,(int32_t)nTxSize,(int32_t)nBlockMaxSize); fprintf(stderr,"nBlockSize %d + %d nTxSize >= %d nBlockMaxSize\n",(int32_t)nBlockSize,(int32_t)nTxSize,(int32_t)nBlockMaxSize);
continue; continue;
} }
@@ -307,7 +310,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
unsigned int nTxSigOps = GetLegacySigOpCount(tx); unsigned int nTxSigOps = GetLegacySigOpCount(tx);
if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS-1) if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS-1)
{ {
//fprintf(stderr,"A nBlockSigOps %d + %d nTxSigOps >= %d MAX_BLOCK_SIGOPS-1\n",(int32_t)nBlockSigOps,(int32_t)nTxSigOps,(int32_t)MAX_BLOCK_SIGOPS); fprintf(stderr,"A nBlockSigOps %d + %d nTxSigOps >= %d MAX_BLOCK_SIGOPS-1\n",(int32_t)nBlockSigOps,(int32_t)nTxSigOps,(int32_t)MAX_BLOCK_SIGOPS);
continue; continue;
} }
// Skip free transactions if we're past the minimum block size: // Skip free transactions if we're past the minimum block size:
@@ -317,7 +320,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta); mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < ::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize)) if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < ::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
{ {
//fprintf(stderr,"fee rate skip\n"); fprintf(stderr,"fee rate skip\n");
continue; continue;
} }
// Prioritise by fee once past the priority size or we run out of high-priority // Prioritise by fee once past the priority size or we run out of high-priority
@@ -332,7 +335,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
if (!view.HaveInputs(tx)) if (!view.HaveInputs(tx))
{ {
//fprintf(stderr,"dont have inputs\n"); fprintf(stderr,"dont have inputs\n");
continue; continue;
} }
if ( 0 ) if ( 0 )