upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 2d5cb86..3bc1219 100644
--- a/src/main.h
+++ b/src/main.h
@@ -18,6 +18,13 @@ static const unsigned int MAX_SIZE = 0x02000000;
18// Ceiling on transactions held waiting for a parent that has not arrived. 18// Ceiling on transactions held waiting for a parent that has not arrived.
19// They cost a peer nothing to send and are never validated, only stored. 19// They cost a peer nothing to send and are never validated, only stored.
20static const unsigned int MAX_ORPHAN_TRANSACTIONS = 100; 20static const unsigned int MAX_ORPHAN_TRANSACTIONS = 100;
21// Blocks held waiting for a parent that has not arrived. Orphan transactions
22// have had a ceiling since 0.1.0 and orphan blocks never did: one whose parent
23// never turns up stays in memory for the life of the process, and a peer can
24// send an unlimited number of them by inventing the previous-block hash. They
25// are not free either -- each holds a whole block. A production node was
26// seeing 1287 of them against 4117 blocks processed.
27static const unsigned int MAX_ORPHAN_BLOCKS = 200;
21// Signature operations allowed in one block. Size alone does not bound what a 28// Signature operations allowed in one block. Size alone does not bound what a
22// block costs to validate: every OP_CHECKSIG is an elliptic-curve verification, 29// block costs to validate: every OP_CHECKSIG is an elliptic-curve verification,
23// so a block within the size limit could still hold millions of them and take 30// so a block within the size limit could still hold millions of them and take
@@ -125,6 +132,8 @@ void PrintBlockTree();
125void AddOrphanTx(const CDataStream& vMsg); 132void AddOrphanTx(const CDataStream& vMsg);
126void EraseOrphanTx(uint256 hash); 133void EraseOrphanTx(uint256 hash);
127void LimitOrphanTx(unsigned int nMaxOrphans); 134void LimitOrphanTx(unsigned int nMaxOrphans);
135// Same ceiling idea for orphan blocks, which never had one.
136void LimitOrphanBlocks(unsigned int nMaxOrphans);
128// nThreadId is 1..N, only for logging: it makes each miner's lines 137// nThreadId is 1..N, only for logging: it makes each miner's lines
129// distinguishable, which the dedup filter would otherwise collapse into one. 138// distinguishable, which the dedup filter would otherwise collapse into one.
130bool BitcoinMiner(int nThreadId = 1); 139bool BitcoinMiner(int nThreadId = 1);