aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_dersig.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-08-07 15:33:02 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-08-07 15:45:37 +0200
commite7ea858729d3274ec3881688a21bc450b3f58aee (patch)
tree8c37e04247b6183517f25e60c622e28ae49f6068 /test/functional/feature_dersig.py
parentb413ba027312bc21e35c37e74a071c47d67676c8 (diff)
parentfaa24441ec047ec336b86f586016b9d318c1c0ad (diff)
Merge #13527: policy: Remove promiscuousmempoolflags
faa24441ec047ec336b86f586016b9d318c1c0ad policy: Remove promiscuousmempoolflags (MarcoFalke) Pull request description: It seems odd to clutter validation code with features that can only ever be used for testing (testnet or regtest). Removing that test-only code makes the mempool logic less painful to understand and easier to reason about when changed or refactored in the future. Tree-SHA512: 3b897aa9604ac8d82ebe9573c6efd468c93ddaa08d378ebc902e247b7aa6c68fcde71e5b449c08f17a067146cdc66dc50a67ce06d07607c27e5189a49c3fba3f
Diffstat (limited to 'test/functional/feature_dersig.py')
-rwxr-xr-xtest/functional/feature_dersig.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py
index 13224466d3..4337d42dc0 100755
--- a/test/functional/feature_dersig.py
+++ b/test/functional/feature_dersig.py
@@ -47,10 +47,11 @@ def create_transaction(node, coinbase, to_address, amount):
tx.deserialize(BytesIO(hex_str_to_bytes(signresult['hex'])))
return tx
+
class BIP66Test(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
- self.extra_args = [['-promiscuousmempoolflags=1', '-whitelist=127.0.0.1']]
+ self.extra_args = [['-whitelist=127.0.0.1']]
self.setup_clean_chain = True
def run_test(self):
@@ -108,12 +109,13 @@ class BIP66Test(BitcoinTestFramework):
spendtx.rehash()
# First we show that this tx is valid except for DERSIG by getting it
- # accepted to the mempool (which we can achieve with
- # -promiscuousmempoolflags).
- self.nodes[0].p2p.send_and_ping(msg_tx(spendtx))
- assert spendtx.hash in self.nodes[0].getrawmempool()
+ # rejected from the mempool for exactly that reason.
+ assert_equal(
+ [{'txid': spendtx.hash, 'allowed': False, 'reject-reason': '64: non-mandatory-script-verify-flag (Non-canonical DER signature)'}],
+ self.nodes[0].testmempoolaccept(rawtxs=[bytes_to_hex_str(spendtx.serialize())], allowhighfees=True)
+ )
- # Now we verify that a block with this transaction is invalid.
+ # Now we verify that a block with this transaction is also invalid.
block.vtx.append(spendtx)
block.hashMerkleRoot = block.calc_merkle_root()
block.rehash()