`run_tests` now takes a (subclass of) `RPCTestHandler` as its first
argument, and returns `True` if all tests passed instead of calling
`sys.exit`. This enables RPC tests to be run from Python and the
execution of individual tests to be customised:
```python
import importlib
import sys
sys.path.append('qa/pull-tester')
rpc_tests = importlib.import_module('rpc-tests')
src_dir = '.'
build_dir = '.'
exeext = ''
class MyTestHandler(rpc_tests.RPCTestHandler):
def start_test(self, args, stdout, stderr):
print('Starting test!')
return subprocess.Popen(
args,
universal_newlines=True,
stdout=stdout,
stderr=stderr)
test_list = ['test_to_run.py']
all_passed = rpc_tests.run_tests(MyTestHandler, test_list, src_dir, build_dir, exeext)
```
These features were deprecated at least 3 minor releases ago. I found
one mistake which was that `z_validateaddress` had not been placed
behind the `addrtype` deprecated feature; this has been fixed.
The RPC method handler is left in as a tombstone, to redirect callers to
the replacement method (as this is an upstream Bitcoin Core RPC method
that users may expect to be present).
Under some circumstances it is possible for there to be a significant,
discontinuous jump in a node's clock value. On mining nodes, this can
result in block templates which are no longer valid due to time-based
nLockTime constraints. UpdateTime() is modified so that it will never
decrease a block's nLockTime, thereby preventing such invalidations.
(cherry picked from commit bitcoin/bitcoin@ef8dfe41d1)
Zcash: Updated CreateNewBlock_validity test and wallet_1941 RPC test to
ensure we satisfy the future timestamp soft fork rule.
Associate with each CTxMemPoolEntry all the size/fees of descendant
mempool transactions. Sort mempool by max(feerate of entry, feerate
of descendants). Update statistics on-the-fly as transactions enter
or leave the mempool.
Also add ancestor and descendant limiting, so that transactions can
be rejected if the number or size of unconfirmed ancestors exceeds
a target, or if adding a transaction would cause some other mempool
entry to have too many (or too large) a set of unconfirmed in-
mempool descendants.
(cherry picked from commit bitcoin/bitcoin@5add7a74a6)
Zcash:
- Mempool methods were adapted to our mempool changes.
- Default ancestor and descendant size limits were double to account for
our larger block size.
- The mempool_packages RPC test fee was adapted to account for our
emissions curve (which results in a smaller per-block reward that
needs to be split into smaller shards for sequential transactions.
- Includes some modifications to account for us backporting
bitcoin/bitcoin@f3fe83673e early in
zcash/zcash#5269.