HomePhabricator

[backport] rpc: Move the `generate` RPC call to rpcwallet

Description

[backport] rpc: Move the generate RPC call to rpcwallet

Summary:
Backport Core PR10683: rpc: Move the generate RPC call to rpcwallet

2a96283 rpc: Update `generate` for developer notes (Wladimir J. van der Laan)
df7e2f0 rpc: Move the `generate` RPC call to rpcwallet (Wladimir J. van der Laan)

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.

Closes T186

Test Plan: make check && ./test/functional/test_runner.py

Reviewers: deadalnix, jasonbcox, matiu, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: teamcity

Maniphest Tasks: T186

Differential Revision: https://reviews.bitcoinabc.org/D1003

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jun 27 2017, 14:50
schancelCommitted on Jan 22 2018, 23:13
schancelPushed on Jan 22 2018, 23:13
Reviewer
Restricted Project
Differential Revision
D1003: [backport] rpc: Move the `generate` RPC call to rpcwallet
Parents
rABC0961aae47220: Introduce combine_logs.py to combine log files from multiple bitcoinds.
Branches
Unknown
Tags
Unknown
Tasks
T186: Backport Core PR10683: rpc: Move the `generate` RPC call to rpcwallet