mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 10:41:08 +00:00
mining: rename getCoinbaseTx() to ..RawTx()
This frees up the name getCoinbaseTx() for the next commit. Changing a function name does not impact IPC clients, as they only consider the function signature and sequence number.
This commit is contained in:
parent
516ae5ede4
commit
d59b4cdb57
5
doc/release-notes-33819.md
Normal file
5
doc/release-notes-33819.md
Normal file
@ -0,0 +1,5 @@
|
||||
Mining IPC
|
||||
----------
|
||||
|
||||
- The `getCoinbaseTx()` method is renamed to `getCoinbaseRawTx()`.
|
||||
IPC clients do not use the function name, so they're not affected. (#33819)
|
||||
@ -42,8 +42,19 @@ public:
|
||||
// Sigop cost per transaction, not including coinbase transaction.
|
||||
virtual std::vector<int64_t> getTxSigops() = 0;
|
||||
|
||||
virtual CTransactionRef getCoinbaseTx() = 0;
|
||||
/**
|
||||
* Return serialized dummy coinbase transaction.
|
||||
*/
|
||||
virtual CTransactionRef getCoinbaseRawTx() = 0;
|
||||
|
||||
/**
|
||||
* Return scriptPubKey with SegWit OP_RETURN.
|
||||
*/
|
||||
virtual std::vector<unsigned char> getCoinbaseCommitment() = 0;
|
||||
|
||||
/**
|
||||
* Return which output in the dummy coinbase contains the SegWit OP_RETURN.
|
||||
*/
|
||||
virtual int getWitnessCommitmentIndex() = 0;
|
||||
|
||||
/**
|
||||
|
||||
@ -27,7 +27,7 @@ interface BlockTemplate $Proxy.wrap("interfaces::BlockTemplate") {
|
||||
getBlock @2 (context: Proxy.Context) -> (result: Data);
|
||||
getTxFees @3 (context: Proxy.Context) -> (result: List(Int64));
|
||||
getTxSigops @4 (context: Proxy.Context) -> (result: List(Int64));
|
||||
getCoinbaseTx @5 (context: Proxy.Context) -> (result: Data);
|
||||
getCoinbaseRawTx @5 (context: Proxy.Context) -> (result: Data);
|
||||
getCoinbaseCommitment @6 (context: Proxy.Context) -> (result: Data);
|
||||
getWitnessCommitmentIndex @7 (context: Proxy.Context) -> (result: Int32);
|
||||
getCoinbaseMerklePath @8 (context: Proxy.Context) -> (result: List(Data));
|
||||
|
||||
@ -888,7 +888,7 @@ public:
|
||||
return m_block_template->vTxSigOpsCost;
|
||||
}
|
||||
|
||||
CTransactionRef getCoinbaseTx() override
|
||||
CTransactionRef getCoinbaseRawTx() override
|
||||
{
|
||||
return m_block_template->block.vtx[0];
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ class IPCInterfaceTest(BitcoinTestFramework):
|
||||
return block
|
||||
|
||||
async def parse_and_deserialize_coinbase_tx(self, block_template, ctx):
|
||||
coinbase_data = BytesIO((await block_template.getCoinbaseTx(ctx)).result)
|
||||
coinbase_data = BytesIO((await block_template.getCoinbaseRawTx(ctx)).result)
|
||||
tx = CTransaction()
|
||||
tx.deserialize(coinbase_data)
|
||||
return tx
|
||||
@ -191,7 +191,7 @@ class IPCInterfaceTest(BitcoinTestFramework):
|
||||
assert_equal(len(txfees.result), 0)
|
||||
txsigops = await template.getTxSigops(ctx)
|
||||
assert_equal(len(txsigops.result), 0)
|
||||
coinbase_data = BytesIO((await template.getCoinbaseTx(ctx)).result)
|
||||
coinbase_data = BytesIO((await template.getCoinbaseRawTx(ctx)).result)
|
||||
coinbase = CTransaction()
|
||||
coinbase.deserialize(coinbase_data)
|
||||
assert_equal(coinbase.vin[0].prevout.hash, 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user