HomePhabricator

[Part5] CWallet constructor now has additional parameter chainParams

Description

[Part5] CWallet constructor now has additional parameter chainParams

Summary:
CWallet constructor (and some of the CWallet's static methods) now take chainParams as parameter. This enabled us to get fix many calls to DecodeAddress, that did not specify chainParams as an explicit parameter.

Wallet_tests. Cpp: wallet was moved from static to local function scope, so that it can be initialized after chainParameters are available. I've preserved the global locking mechanism by adding walletCriticalSection (some state like vCoins is still global)

Refs T170

Test Plan:
make check
./test/functional/test_runner.py --extended

Reviewers: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Subscribers: teamcity

Maniphest Tasks: T170

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