Get rid of unneeded CWalletTx::Init parameter

This commit is contained in:
Russell Yanofsky 2017-11-20 12:49:26 -05:00
parent 2b9cba2065
commit bd2fbc7cdb

View file

@ -338,15 +338,15 @@ public:
mutable bool fInMempool; mutable bool fInMempool;
mutable CAmount nChangeCached; mutable CAmount nChangeCached;
CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) CWalletTx(const CWallet* wallet, CTransactionRef arg)
: tx(std::move(arg)) : pwallet(wallet),
tx(std::move(arg))
{ {
Init(pwalletIn); Init();
} }
void Init(const CWallet* pwalletIn) void Init()
{ {
pwallet = pwalletIn;
mapValue.clear(); mapValue.clear();
vOrderForm.clear(); vOrderForm.clear();
fTimeReceivedIsTxTime = false; fTimeReceivedIsTxTime = false;
@ -414,7 +414,7 @@ public:
template<typename Stream> template<typename Stream>
void Unserialize(Stream& s) void Unserialize(Stream& s)
{ {
Init(nullptr); Init();
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch
std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev