When a wallet owns only some inputs of a transaction (e.g. CoinJoins, payjoins, or other collaborative transactions), gettransaction, listtransactions and listsinceblock currently fabricate “send” entries for outputs the wallet didn’t fund and misattribute the full transaction fee to the wallet. This is because the accounting code treats any nDebit > 0 (i.e. any wallet-owned input) as a full wallet spend.
Fixes this by introducing CachedTxIsFromMeForAccounting, which requires all inputs to be wallet-owned before generating send entries or reporting fees. This is scoped strictly to history/accounting RPCs - the broader CachedTxIsFromMe semantics used by trust evaluation (CachedTxIsTrusted) and spend selection remain unchanged.
Addresses #14136