mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-09 21:47:34 +01:00
Merge bitcoin/bitcoin#30200: Introduce Mining interface
a9716c53f0rpc: call IsInitialBlockDownload via miner interface (Sjors Provoost)dda0b0834frpc: minize getTipHash() calls in gbt (Sjors Provoost)7b4d3249cerpc: call processNewBlock via miner interface (Sjors Provoost)9e228351e7rpc: getTransactionsUpdated via miner interface (Sjors Provoost)64ebb0f971Always pass options to BlockAssembler constructor (Sjors Provoost)4bf2e361darpc: call CreateNewBlock via miner interface (Sjors Provoost)404b01c436rpc: getblocktemplate getTipHash() via Miner interface (Sjors Provoost)d8a3496b5arpc: call TestBlockValidity via miner interface (Sjors Provoost)8ecb681678Introduce Mining interface (Sjors Provoost) Pull request description: Introduce a `Mining` interface for the `getblocktemplate`, `generateblock` and other mining RPCs to use now, and for Stratum v2 to use later. Suggested here: https://github.com/bitcoin/bitcoin/pull/29346#issuecomment-2108528652 The selection of methods added to the interface is mostly based on what the Template Provider in #29432 uses. It could be expanded further so that `rpc/mining.cpp` no longer needs `EnsureMemPool` and `EnsureChainman`. This PR should be a pure refactor. ACKs for top commit: tdb3: re ACKa9716c53f0itornaza: Code review and std-tests ACKa9716c53f0ryanofsky: Code review ACKa9716c53f0with one minor suggestion in case you update. Only changes since last review were other small changes to the interface. Tree-SHA512: cf97f87d6e9ed89da3835a0730da3b24a7b14c8605ea221149103a5915e79598cf082a95f2bc88e33f1c450e3d4aad88aed1163a29195acca88bcace055af724
This commit is contained in:
@@ -87,7 +87,7 @@ class RPCGenerateTest(BitcoinTestFramework):
|
||||
txid1 = miniwallet.send_self_transfer(from_node=node)['txid']
|
||||
utxo1 = miniwallet.get_utxo(txid=txid1)
|
||||
rawtx2 = miniwallet.create_self_transfer(utxo_to_spend=utxo1)['hex']
|
||||
assert_raises_rpc_error(-25, 'TestBlockValidity failed: bad-txns-inputs-missingorspent', self.generateblock, node, address, [rawtx2, txid1])
|
||||
assert_raises_rpc_error(-25, 'testBlockValidity failed: bad-txns-inputs-missingorspent', self.generateblock, node, address, [rawtx2, txid1])
|
||||
|
||||
self.log.info('Fail to generate block with txid not in mempool')
|
||||
missing_txid = '0000000000000000000000000000000000000000000000000000000000000000'
|
||||
|
||||
Reference in New Issue
Block a user