bitcoin/src/rpc
MarcoFalke a30642926a
Merge bitcoin/bitcoin#23721: wallet, refactor: Move restorewallet() logic to the wallet section
62fa61fa4a refactor: remove the wallet folder if the restore fails (w0xlt)
abbb7eccef refactor: Move restorewallet() RPC logic to the wallet section (w0xlt)
4807f73f48 refactor: Implement restorewallet() logic in the wallet section (w0xlt)

Pull request description:

  Currently `restorewallet()` logic is written in the RPC layer and it can´t be reused by GUI. So it moves this to the wallet section and then, GUI can access it.

  This is necessary to implement the "Restore Wallet" menu item in the GUI (which is already implemented  in https://github.com/bitcoin-core/gui/pull/471 ).

  This commit also simplifies error handling and adds a new behavior: if the restore fails, the invalid wallet folder is removed.

ACKs for top commit:
  achow101:
    ACK 62fa61fa4a
  shaavan:
    crACK 62fa61fa4a

Tree-SHA512: 7ccfbad5943f38616ba0c2dd443c97a4b5bc1f6612dbf5a9e7a0263100aba36671fae929a2e7688442667be394645f44484af137a4802f204a33c4689eb27c39
2021-12-16 08:42:44 +01:00
..
blockchain.cpp rpc: Quote user supplied strings in error messages 2021-12-13 15:18:35 +01:00
blockchain.h Merge bitcoin/bitcoin#20295: rpc: getblockfrompeer 2021-12-08 10:39:37 +01:00
client.cpp Merge bitcoin/bitcoin#20295: rpc: getblockfrompeer 2021-12-08 10:39:37 +01:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
external_signer.cpp doc: Fix RPC result documentation 2021-09-21 11:13:29 +02:00
mining.cpp refactor: remove unneeded calls to strprintf() 2021-12-14 10:09:42 +08:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp refactor: remove unneeded calls to strprintf() 2021-12-14 10:09:42 +08:00
net.cpp Merge bitcoin/bitcoin#23758: net: Use type-safe mockable time for peer connection time 2021-12-15 13:07:34 +01:00
protocol.h refactor: Move restorewallet() RPC logic to the wallet section 2021-12-15 18:41:40 -03:00
rawtransaction.cpp Merge bitcoin/bitcoin#22674: validation: mempool validation and submission for packages of 1 child + parents 2021-12-15 20:42:33 +01:00
rawtransaction_util.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
rawtransaction_util.h Change SignTransaction's input_errors to use bilingual_str 2021-07-01 12:57:53 -04:00
register.h Move external signer out of wallet module 2021-04-08 17:56:00 +02:00
request.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
request.h Drop JSONRPCRequest constructors after #21366 2021-04-07 04:53:26 -04:00
server.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
server.h [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
server_util.cpp rpc: move Ensure* helpers to server_util.h 2021-12-02 13:15:32 +07:00
server_util.h rpc: move Ensure* helpers to server_util.h 2021-12-02 13:15:32 +07:00
util.cpp rpc: Quote user supplied strings in error messages 2021-12-13 15:18:35 +01:00
util.h refactor: Remove useless extern keyword 2021-05-10 09:09:24 +02:00