Page MenuHomePhabricator

D6106.diff
No OneTemporary

D6106.diff

diff --git a/src/miner.h b/src/miner.h
--- a/src/miner.h
+++ b/src/miner.h
@@ -154,7 +154,6 @@
int64_t nLockTimeCutoff;
int64_t nMedianTimePast;
const CChainParams &chainparams;
- bool fUseSigChecks;
const CTxMemPool *mempool;
@@ -186,13 +185,6 @@
/** Add a tx to the block */
void AddToBlock(CTxMemPool::txiter iter);
- /**
- * Calculate the "SigOps" limit for a given block size (may actually be the
- * SigChecks limit which is independent of blockSize, depending on
- * fUseSigChecks)
- */
- uint64_t MaxBlockSigOpsCountForSize(uint64_t blockSize) const;
-
// Methods for how to add transactions to a block.
/**
* Add transactions based on feerate including unconfirmed ancestors.
diff --git a/src/miner.cpp b/src/miner.cpp
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -161,11 +161,6 @@
? nMedianTimePast
: pblock->GetBlockTime();
- // After the sigchecks activation we repurpose the 'sigops' tracking in
- // mempool/mining to actually track sigchecks instead. (Proper SigOps will
- // not need to be counted any more since it's getting deactivated.)
- fUseSigChecks = IsPhononEnabled(chainparams.GetConsensus(), pindexPrev);
-
int nPackagesSelected = 0;
int nDescendantsUpdated = 0;
addPackageTxs(nPackagesSelected, nDescendantsUpdated);
@@ -230,8 +225,7 @@
UpdateTime(pblock, consensusParams, pindexPrev);
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams);
pblock->nNonce = 0;
- pblocktemplate->entries[0].sigOpCount = GetSigOpCountWithoutP2SH(
- *pblocktemplate->entries[0].tx, STANDARD_SCRIPT_VERIFY_FLAGS);
+ pblocktemplate->entries[0].sigOpCount = 0;
CValidationState state;
if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev,
@@ -266,11 +260,6 @@
}
}
-uint64_t BlockAssembler::MaxBlockSigOpsCountForSize(uint64_t blockSize) const {
- return fUseSigChecks ? nMaxGeneratedBlockSigChecks
- : GetMaxBlockSigOpsCount(blockSize);
-}
-
bool BlockAssembler::TestPackage(uint64_t packageSize,
int64_t packageSigOps) const {
auto blockSizeWithPackage = nBlockSize + packageSize;
@@ -278,8 +267,7 @@
return false;
}
- if (nBlockSigOps + packageSigOps >=
- MaxBlockSigOpsCountForSize(blockSizeWithPackage)) {
+ if (nBlockSigOps + packageSigOps >= nMaxGeneratedBlockSigChecks) {
return false;
}

File Metadata

Mime Type
text/plain
Expires
Tue, May 20, 21:16 (15 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865939
Default Alt Text
D6106.diff (2 KB)

Event Timeline