Skip to content

zcash_client_sqlite: wallet summary missing coins because change output is identical #1964

@ebfull

Description

@ebfull

I created a transaction paying my own Orchard receiver some ZEC, and it created four new notes: one the self-payment note, and three for change. The change value was not evenly divisible by three, so it was distributed between the change notes such that two of the change notes have the same value x and the third has a value x + 1.

This causes a problem with the wallet summary query, which does a GROUP BY that collapses the two distinct unspent change notes that have the same value into a single row.

GROUP BY accounts.uuid, rn.value, rn.is_change, rn.recipient_key_scope,
                      scan_state.max_priority, t.block

This causes my wallet to report missing ZEC in my total balance.

(observed while alpha testing zallet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions