mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts
67d6ee1remove redundant tests in p2p-segwit.py (Johnson Lau)9260085test segwit uncompressed key fixes (Johnson Lau)248f3a7Fix ismine and addwitnessaddress: no uncompressed keys in segwit (Pieter Wuille)b811124[qa] Add tests for uncompressed pubkeys in segwit (Suhas Daftuar)9f0397aMake test framework produce lowS signatures (Johnson Lau)4c0c25aRequire compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts (Johnson Lau)3ade2f6Add standard limits for P2WSH with tests (Johnson Lau)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2009-2015 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2016 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1273,6 +1273,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
||||
if (fRequireStandard && !AreInputsStandard(tx, view))
|
||||
return state.Invalid(false, REJECT_NONSTANDARD, "bad-txns-nonstandard-inputs");
|
||||
|
||||
// Check for non-standard witness in P2WSH
|
||||
if (!tx.wit.IsNull() && fRequireStandard && !IsWitnessStandard(tx, view))
|
||||
return state.DoS(0, false, REJECT_NONSTANDARD, "bad-witness-nonstandard", true);
|
||||
|
||||
int64_t nSigOpsCost = GetTransactionSigOpCost(tx, view, STANDARD_SCRIPT_VERIFY_FLAGS);
|
||||
|
||||
CAmount nValueOut = tx.GetValueOut();
|
||||
|
||||
Reference in New Issue
Block a user