mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
wallet: Avoid dropping confirmed coins
This commit is contained in:
parent
888841ea8d
commit
fa272eab44
6 changed files with 55 additions and 10 deletions
|
|
@ -279,8 +279,6 @@ bool CachedTxIsFromMe(const CWallet& wallet, const CWalletTx& wtx, const isminef
|
|||
bool CachedTxIsTrusted(const CWallet& wallet, const CWalletTx& wtx, std::set<uint256>& trusted_parents)
|
||||
{
|
||||
AssertLockHeld(wallet.cs_wallet);
|
||||
// Quick answer in most cases
|
||||
if (!wallet.chain().checkFinalTx(*wtx.tx)) return false;
|
||||
int nDepth = wallet.GetTxDepthInMainChain(wtx);
|
||||
if (nDepth >= 1) return true;
|
||||
if (nDepth < 0) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue