X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fwallet.cpp;h=b5fb1aa686fc3dd4586d6c1bd31c00d81da73f0d;hp=a1fe81d297f07be0f10898b9a92c3128f2306b01;hb=06b264fc74cdd207afaa75f76f029fe14a92930b;hpb=9e58e0a8ca28b15a4bfa677f5b23891972db40fd diff --git a/src/wallet.cpp b/src/wallet.cpp index a1fe81d..b5fb1aa 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -752,7 +752,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) // Add a transaction to the wallet, or update it. // pblock is optional, but should be provided if the transaction is known to be in a block. // If fUpdate is true, existing transactions will be updated. -bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fFindBlock) +bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate) { uint256 hash = tx.GetHash(); { @@ -764,7 +764,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl CWalletTx wtx(this,tx); // Get merkle branch if transaction was found in a block if (pblock) - wtx.SetMerkleBranch(pblock); + wtx.SetMerkleBranch(*pblock); return AddToWallet(wtx); } else @@ -956,7 +956,7 @@ void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nGenerated, list > listSent; GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount, filter); - if (strAccount == "") + if (strAccount.empty()) nGenerated = allGeneratedMature; if (strAccount == strSentAccount) { @@ -1076,7 +1076,7 @@ int CWallet::ScanForWalletTransaction(const uint256& hashTx) { CTransaction tx; tx.ReadFromDisk(COutPoint(hashTx, 0)); - if (AddToWalletIfInvolvingMe(tx, NULL, true, true)) + if (AddToWalletIfInvolvingMe(tx, NULL, true)) return 1; return 0; }