HomePhabricator

tests: move pwalletMain to wallet test fixture

Description

tests: move pwalletMain to wallet test fixture

Summary:

Scope the variable instead of using an external global; this is how test
fixtures are intended to be used.

Followup to #11713.

Backport of core PR11718
https://github.com/bitcoin/bitcoin/pull/11718/files

Depends on D3097
Completes T659

Test Plan:

make check

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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