mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 9bf5768dd6 into merged_master (Bitcoin PR #16885)
This commit is contained in:
commit
084729aa3d
2 changed files with 4 additions and 1 deletions
|
|
@ -601,7 +601,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
|
|||
|
||||
// Do not work on transactions that are too small.
|
||||
// A transaction with 1 segwit input and 1 P2WPHK output has non-witness size of 82 bytes.
|
||||
// Transactions smaller than this are not relayed to reduce unnecessary malloc overhead.
|
||||
// Transactions smaller than this are not relayed to mitigate CVE-2017-12842 by not relaying
|
||||
// 64-byte transactions.
|
||||
if (::GetSerializeSize(tx, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) < MIN_STANDARD_TX_NONWITNESS_SIZE)
|
||||
return state.Invalid(ValidationInvalidReason::TX_NOT_STANDARD, false, REJECT_NONSTANDARD, "tx-size-small");
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ class InputMissing(BadTxTemplate):
|
|||
|
||||
# ELEMENTS: disabled because we don't want to increase the minimal tx size and
|
||||
# the value and asset size crosses the minimum value
|
||||
# The following check prevents exploit of lack of merkle
|
||||
# tree depth commitment (CVE-2017-12842)
|
||||
#class SizeTooSmall(BadTxTemplate):
|
||||
# reject_reason = "tx-size-small"
|
||||
# expect_disconnect = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue