| 3324 | } |
| 3325 | |
| 3326 | int CWallet::GetTxDepthInMainChain(const CWalletTx& wtx) const |
| 3327 | { |
| 3328 | AssertLockHeld(cs_wallet); |
| 3329 | if (auto* conf = wtx.state<TxStateConfirmed>()) { |
| 3330 | return GetLastBlockHeight() - conf->confirmed_block_height + 1; |
| 3331 | } else if (auto* conf = wtx.state<TxStateConflicted>()) { |
| 3332 | return -1 * (GetLastBlockHeight() - conf->conflicting_block_height + 1); |
| 3333 | } else { |
| 3334 | return 0; |
| 3335 | } |
| 3336 | } |
| 3337 | |
| 3338 | int CWallet::GetTxBlocksToMaturity(const CWalletTx& wtx) const |
| 3339 | { |
no outgoing calls
no test coverage detected