interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes

Needed to fix new wallet_groups.py and wallet_resendwallettransactions.py tests
with multiprocess bitcoin-node executable.
This commit is contained in:
Ryan Ofsky
2022-09-08 15:21:08 -04:00
parent 924327eaf3
commit 4978754c00
6 changed files with 19 additions and 5 deletions

View File

@ -13,6 +13,7 @@
#include <vector>
class ArgsManager;
class CScheduler;
namespace interfaces {
class Chain;
class Wallet;
@ -34,6 +35,7 @@ using LoadWalletFn = std::function<void(std::unique_ptr<interfaces::Wallet> wall
//! behavior.
struct WalletContext {
interfaces::Chain* chain{nullptr};
CScheduler* scheduler{nullptr};
ArgsManager* args{nullptr}; // Currently a raw pointer because the memory is not managed by this struct
// It is unsafe to lock this after locking a CWallet::cs_wallet mutex because
// this could introduce inconsistent lock ordering and cause deadlocks.