diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-10 13:11:30 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-04-10 13:12:30 -0400 |
commit | 51e2ce45d6824b4d621f26b2048e6a43672e45dc (patch) | |
tree | 959ceadc1508a1d197af3ab66da9e3716c0c0ce8 /contrib/gitian-descriptors/gitian-linux.yml | |
parent | 10358a381aeec08a42f5e456c2041c0442a5dbd1 (diff) | |
parent | 7524b6479cb20471d827aec5500925c86c62ce1c (diff) | |
download | bitcoin-51e2ce45d6824b4d621f26b2048e6a43672e45dc.tar.xz |
Merge #17693: rpc: Add generateblock to mine a custom set of transactions
7524b6479cb20471d827aec5500925c86c62ce1c Add tests for generateblock (Andrew Toth)
dcc8332543f8fb6d1bb47cb270fcbb6a814a7d6e Add generateblock rpc (Andrew Toth)
Pull request description:
The existing block generation rpcs for regtest, `generatetoaddress` and `generatetodescriptor`, mine everything in the mempool up to the block weight limit. This makes it difficult to test a system for several scenarios where a different set of transactions are mined. For example:
- Testing the common scenario where a transaction is replaced in the mempool but the replaced transaction is mined instead.
- Testing for a double-spent transaction where a transaction that conflicts with the mempool is mined.
- Testing for non-standard transactions that are mined.
- Testing the scenario where several blocks are mined without a specific transaction in the mempool being included in a block.
This PR introduces a new rpc, `generateblock`, that takes an array of raw transactions and txids and mines only those and the coinbase. Any txids must be in the mempool, but the raw txs can be anything conforming to consensus rules. The coinbase can be specified as either an address or descriptor.
This reopens #17653 since it was closed by mistake.
Thanks to instagibbs for code suggestions that I used here.
ACKs for top commit:
MarcoFalke:
re-ACK 7524b6479cb20471d827aec5500925c86c62ce1c 📁
Tree-SHA512: 857106007465b5b9b8a84b6d07c17cbf8378a33a72d32ff79abea1d5ab4babb4d53a11ddbb14595aa1fac9dfa1391e3a11403d742f69951beea2f683e8a01cd4
Diffstat (limited to 'contrib/gitian-descriptors/gitian-linux.yml')
0 files changed, 0 insertions, 0 deletions