mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
[c++11] Use std::unique_ptr for block creation.
CreateNewBlock returns a pointer for which the caller takes ownership. Use std::unique_ptr to make this explicit and simplify handling of these objects in getblocktemplate.
This commit is contained in:
@@ -160,7 +160,7 @@ private:
|
||||
public:
|
||||
BlockAssembler(const CChainParams& chainparams);
|
||||
/** Construct a new block template with coinbase to scriptPubKeyIn */
|
||||
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
|
||||
std::unique_ptr<CBlockTemplate> CreateNewBlock(const CScript& scriptPubKeyIn);
|
||||
|
||||
private:
|
||||
// utility functions
|
||||
|
Reference in New Issue
Block a user