aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-07-19 19:56:12 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2019-07-19 20:00:12 +0200
commit51a6e2c4192913c9c18507d8dfb3302500b26cc3 (patch)
treeed1f4ddc01217aa66b0359d11a8b28e488e72e85 /src/validation.h
parentf4b1fe7165c84d7ed4ef84cac7e0dc6804973fa5 (diff)
parent50cede3f5a4d4fbfbb7c420b94e661a6a159bced (diff)
downloadbitcoin-51a6e2c4192913c9c18507d8dfb3302500b26cc3.tar.xz
Merge #15681: [mempool] Allow one extra single-ancestor transaction per package
50cede3f5a4d4fbfbb7c420b94e661a6a159bced [mempool] Allow one extra single-ancestor transaction per package (Matt Corallo) Pull request description: This implements the proposed policy change from [1], which allows certain classes of contract protocols involving revocation punishments to use CPFP. Note that some such use-cases may still want some form of one-deep package relay, though even this alone may greatly simplify some lightning fee negotiation. [1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html ACKs for top commit: ajtowns: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced -- looked over code again, compared with previous commit, compiles, etc. sdaftuar: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced ryanofsky: utACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced. Changes since last review: adding EXTRA_DESCENDANT_TX_SIZE_LIMIT constant, changing max ancestor size from 1,000,000 to nLimitAncestorSize constant (101,000), fixing test comment and getting rid of unused test node. Tree-SHA512: b052c2a0f384855572b4579310131897b612201214b5abbb225167224e4f550049e300b471dbf320928652571e92ca2d650050b7cf39ac92b3bc1d2bcd386c1c
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h
index 7739d3de4a..d747fdbf27 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -64,6 +64,12 @@ static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25;
/** Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants */
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
+/**
+ * An extra transaction can be added to a package, as long as it only has one
+ * ancestor and is no larger than this. Not really any reason to make this
+ * configurable as it doesn't materially change DoS parameters.
+ */
+static const unsigned int EXTRA_DESCENDANT_TX_SIZE_LIMIT = 10000;
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336;
/** Maximum kilobytes for transactions to store for processing during reorg */