tests: Fix dangling pwalletMain pointer in wallet tests
tests: Fix dangling pwalletMain pointer in wallet tests

Github-Pull: #9875
Rebased-From: 75a109338fbbe9a30c54d76010b538c8ac1080ac

kallewoof/elements,xieta/mincoin,argentumproject/argentum,Bitcoin-ABC/bitcoin-abc,multicoins/marycoin,multicoins/marycoin,patricklodder/dogecoin,argentumproject/argentum,myriadteam/myriadcoin,segsignal/bitcoin,myriadcoin/myriadcoin,patricklodder/dogecoin,bitcoinec/bitcoinec,matlongsi/micropay,BitcoinPOW/BitcoinPOW,dpayne9000/Rubixz-Coin,tdudz/elements,UASF/bitcoin,ftrader-bitcoinabc/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,xieta/mincoin,myriadcoin/myriadcoin,myriadteam/myriadcoin,ftrader-bitcoinabc/bitcoin-abc,Rav3nPL/PLNcoin,daliwangi/bitcoin,BigBlueCeiling/augmentacoin,senadmd/coinmarketwatch,elecoin/elecoin,tdudz/elements,Bitcoin-ABC/bitcoin-abc,BitcoinPOW/BitcoinPOW,ShadowMyst/creativechain-core,Rav3nPL/PLNcoin,ShadowMyst/creativechain-core,argentumproject/argentum,BitcoinHardfork/bitcoin,tdudz/elements,goldcoin/Goldcoin-GLD,patricklodder/dogecoin,btc1/bitcoin,dogecoin/dogecoin,zcoinofficial/zcoin,HashUnlimited/Einsteinium-Unlimited,zcoinofficial/zcoin,Bitcoin-ABC/bitcoin-abc,bitcoinec/bitcoinec,argentumproject/argentum,goldcoin/goldcoin,matlongsi/micropay,qtumproject/qtum,kallewoof/elements,Rav3nPL/PLNcoin,ftrader-bitcoinabc/bitcoin-abc,multicoins/marycoin,mincoin-project/mincoin,cculianu/bitcoin-abc,psionin/smartcoin,myriadcoin/myriadcoin,elecoin/elecoin,goldcoin/goldcoin,zcoinofficial/zcoin,BigBlueCeiling/augmentacoin,dpayne9000/Rubixz-Coin,particl/particl-core,ShadowMyst/creativechain-core,core-bitcoin/bitcoin,particl/particl-core,ShadowMyst/creativechain-core,core-bitcoin/bitcoin,Rav3nPL/PLNcoin,tdudz/elements,UASF/bitcoin,mincoin-project/mincoin,Bitcoin-ABC/bitcoin-abc,plncoin/PLNcoin_Core,goldcoin/goldcoin,xieta/mincoin,BitcoinHardfork/bitcoin,HashUnlimited/Einsteinium-Unlimited,UASF/bitcoin,BitcoinHardfork/bitcoin,cculianu/bitcoin-abc,matlongsi/micropay,bitcoinec/bitcoinec,qtumproject/qtum,tecnovert/particl-core,xieta/mincoin,argentumproject/argentum,patricklodder/dogecoin,myriadteam/myriadcoin,segsignal/bitcoin,goldcoin/Goldcoin-GLD,goldcoin/Goldcoin-GLD,matlongsi/micropay,zcoinofficial/zcoin,cculianu/bitcoin-abc,BitcoinPOW/BitcoinPOW,xieta/mincoin,BitcoinHardfork/bitcoin,EntropyFactory/creativechain-core,qtumproject/qtum,senadmd/coinmarketwatch,myriadteam/myriadcoin,ftrader-bitcoinabc/bitcoin-abc,HashUnlimited/Einsteinium-Unlimited,plncoin/PLNcoin_Core,EntropyFactory/creativechain-core,ShadowMyst/creativechain-core,matlongsi/micropay,ftrader-bitcoinabc/bitcoin-abc,cculianu/bitcoin-abc,UASF/bitcoin,bitcoinec/bitcoinec,BigBlueCeiling/augmentacoin,cculianu/bitcoin-abc,HashUnlimited/Einsteinium-Unlimited,qtumproject/qtum,psionin/smartcoin,Bitcoin-ABC/bitcoin-abc,BigBlueCeiling/augmentacoin,tecnovert/particl-core,psionin/smartcoin,zcoinofficial/zcoin,BitcoinPOW/BitcoinPOW,core-bitcoin/bitcoin,psionin/smartcoin,BigBlueCeiling/augmentacoin,mincoin-project/mincoin,tdudz/elements,btc1/bitcoin,Bitcoin-ABC/bitcoin-abc,goldcoin/Goldcoin-GLD,BigBlueCeiling/augmentacoin,cculianu/bitcoin-abc,senadmd/coinmarketwatch,zcoinofficial/zcoin,argentumproject/argentum,dogecoin/dogecoin,btc1/bitcoin,UASF/bitcoin,dogecoin/dogecoin,plncoin/PLNcoin_Core,dpayne9000/Rubixz-Coin,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,goldcoin/Goldcoin-GLD,dpayne9000/Rubixz-Coin,BitcoinHardfork/bitcoin,mincoin-project/mincoin,ShadowMyst/creativechain-core,dogecoin/dogecoin,senadmd/coinmarketwatch,segsignal/bitcoin,bitcoinec/bitcoinec,core-bitcoin/bitcoin,particl/particl-core,tecnovert/particl-core,plncoin/PLNcoin_Core,kallewoof/elements,myriadcoin/myriadcoin,ftrader-bitcoinabc/bitcoin-abc,daliwangi/bitcoin,dpayne9000/Rubixz-Coin,tdudz/elements,mincoin-project/mincoin,dogecoin/dogecoin,particl/particl-core,cculianu/bitcoin-abc,zcoinofficial/zcoin,daliwangi/bitcoin,Rav3nPL/PLNcoin,particl/particl-core,particl/particl-core,Bitcoin-ABC/bitcoin-abc,elecoin/elecoin,core-bitcoin/bitcoin,dpayne9000/Rubixz-Coin,tecnovert/particl-core,kallewoof/elements,daliwangi/bitcoin,tecnovert/particl-core,elecoin/elecoin,Bitcoin-ABC/bitcoin-abc,bitcoinec/bitcoinec,Rav3nPL/PLNcoin,kallewoof/elements,Bitcoin-ABC/bitcoin-abc,BitcoinHardfork/bitcoin,multicoins/marycoin,goldcoin/Goldcoin-GLD,xieta/mincoin,daliwangi/bitcoin,Bitcoin-ABC/bitcoin-abc,mincoin-project/mincoin,btc1/bitcoin,ftrader-bitcoinabc/bitcoin-abc,multicoins/marycoin,goldcoin/goldcoin,myriadteam/myriadcoin,zcoinofficial/zcoin,senadmd/coinmarketwatch,btc1/bitcoin,plncoin/PLNcoin_Core,segsignal/bitcoin,EntropyFactory/creativechain-core,plncoin/PLNcoin_Core,EntropyFactory/creativechain-core,BitcoinPOW/BitcoinPOW,qtumproject/qtum,dogecoin/dogecoin,EntropyFactory/creativechain-core,zcoinofficial/zcoin,kallewoof/elements,multicoins/marycoin,psionin/smartcoin,myriadteam/myriadcoin,HashUnlimited/Einsteinium-Unlimited,UASF/bitcoin,HashUnlimited/Einsteinium-Unlimited,Bitcoin-ABC/bitcoin-abc,myriadcoin/myriadcoin,elecoin/elecoin,segsignal/bitcoin,myriadcoin/myriadcoin,elecoin/elecoin,tecnovert/particl-core,goldcoin/goldcoin,qtumproject/qtum,segsignal/bitcoin,btc1/bitcoin,EntropyFactory/creativechain-core,BitcoinPOW/BitcoinPOW,daliwangi/bitcoin,ftrader-bitcoinabc/bitcoin-abc,matlongsi/micropay,senadmd/coinmarketwatch,psionin/smartcoin,core-bitcoin/bitcoin,zcoinofficial/zcoin,qtumproject/qtum,patricklodder/dogecoin,argentumproject/argentum,cculianu/bitcoin-abc,goldcoin/goldcoin