mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 14:48:46 +02:00
mining: add new getCoinbaseTx() returning a struct
Introduce a new method intended to replace getCoinbaseRawTx(), which provides a struct with everything clients need to construct a coinbase. This is safer than providing a raw dummy coinbase that clients then have to manipulate. The CoinbaseTx data is populated during the dummy transaction generation and stored in struct CBlockTemplate. Expand the interface_ipc.py functional test to document its usage and ensure equivalence.
This commit is contained in:
@@ -44,16 +44,26 @@ public:
|
||||
|
||||
/**
|
||||
* Return serialized dummy coinbase transaction.
|
||||
*
|
||||
* @note deprecated: use getCoinbaseTx()
|
||||
*/
|
||||
virtual CTransactionRef getCoinbaseRawTx() = 0;
|
||||
|
||||
/** Return fields needed to construct a coinbase transaction */
|
||||
virtual node::CoinbaseTx getCoinbaseTx() = 0;
|
||||
|
||||
/**
|
||||
* Return scriptPubKey with SegWit OP_RETURN.
|
||||
*
|
||||
* @note deprecated: use getCoinbaseTx()
|
||||
*/
|
||||
virtual std::vector<unsigned char> getCoinbaseCommitment() = 0;
|
||||
|
||||
/**
|
||||
* Return which output in the dummy coinbase contains the SegWit OP_RETURN.
|
||||
*
|
||||
* @note deprecated. Scan outputs from getCoinbaseTx() outputs field for the
|
||||
* SegWit marker.
|
||||
*/
|
||||
virtual int getWitnessCommitmentIndex() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user