Skip to content

getbalance/getbalance '*' discrepancy #172

@gavinandresen

Description

@gavinandresen

getbalance and getbalance '*' can return different amounts for 0-confirmation transactions, because of the way change transactions are counted. The discrepancy resolves as soon as the transaction is accepted into a block.

Details: CWalletTx::IsConfirmed() returns false for at least some 0-confirmation transactions loaded from a wallet, because they are missing vtxPrev (supporting transactions). That causes the issue, because getbalance (and the send methods) only count outputs of confirmed transactions as available, but GetAmounts (used by getbalance '*') assumes that change TxOuts are always available to be spent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions