mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
rpc: Move the generate RPC call to rpcwallet
This makes it possible to mine to any wallet when multi-wallet mode is added. Solves the same problem as #10649, but IMO in a cleaner way. It also gets rid of the circuitous `ScriptForMining` method on `CValidationInterface`, which really doesn't belong there. After this change it's still possible to mine without wallet through `generatetoaddress`.
This commit is contained in:
@@ -40,7 +40,6 @@ protected:
|
||||
virtual void Inventory(const uint256 &hash) {}
|
||||
virtual void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) {}
|
||||
virtual void BlockChecked(const CBlock&, const CValidationState&) {}
|
||||
virtual void GetScriptForMining(std::shared_ptr<CReserveScript>&) {};
|
||||
virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& block) {};
|
||||
friend void ::RegisterValidationInterface(CValidationInterface*);
|
||||
friend void ::UnregisterValidationInterface(CValidationInterface*);
|
||||
@@ -72,8 +71,6 @@ struct CMainSignals {
|
||||
* callback was generated (not necessarily now)
|
||||
*/
|
||||
boost::signals2::signal<void (const CBlock&, const CValidationState&)> BlockChecked;
|
||||
/** Notifies listeners that a key for mining is required (coinbase) */
|
||||
boost::signals2::signal<void (std::shared_ptr<CReserveScript>&)> ScriptForMining;
|
||||
/**
|
||||
* Notifies listeners that a block which builds directly on our current tip
|
||||
* has been received and connected to the headers tree, though not validated yet */
|
||||
|
||||
Reference in New Issue
Block a user