mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-23 02:10:51 +02:00
[package] static_assert max package size >= max tx size
This commit is contained in:
parent
8115c2ad7d
commit
6c5f19d9c4
@ -6,6 +6,7 @@
|
|||||||
#define BITCOIN_POLICY_PACKAGES_H
|
#define BITCOIN_POLICY_PACKAGES_H
|
||||||
|
|
||||||
#include <consensus/validation.h>
|
#include <consensus/validation.h>
|
||||||
|
#include <policy/policy.h>
|
||||||
#include <primitives/transaction.h>
|
#include <primitives/transaction.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -14,6 +15,7 @@
|
|||||||
static constexpr uint32_t MAX_PACKAGE_COUNT{25};
|
static constexpr uint32_t MAX_PACKAGE_COUNT{25};
|
||||||
/** Default maximum total virtual size of transactions in a package in KvB. */
|
/** Default maximum total virtual size of transactions in a package in KvB. */
|
||||||
static constexpr uint32_t MAX_PACKAGE_SIZE{101};
|
static constexpr uint32_t MAX_PACKAGE_SIZE{101};
|
||||||
|
static_assert(MAX_PACKAGE_SIZE * WITNESS_SCALE_FACTOR * 1000 >= MAX_STANDARD_TX_WEIGHT);
|
||||||
|
|
||||||
/** A "reason" why a package was invalid. It may be that one or more of the included
|
/** A "reason" why a package was invalid. It may be that one or more of the included
|
||||||
* transactions is invalid or the package itself violates our rules.
|
* transactions is invalid or the package itself violates our rules.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user