Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcrjson: Ready GetStakeInfoResult for SPV wallets. #1333

Merged
merged 1 commit into from
Jul 3, 2018

Commits on Jul 3, 2018

  1. dcrjson: Ready GetStakeInfoResult for SPV wallets.

    This change makes the following fields omitempty so they can be
    ignored by SPV wallets:
    
     * poolsize
     * allmempooltix
     * live
     * proportionlive
     * missed
     * proportionmissed
     * expired
    
    As a side-effect, non-SPV wallets will also omit these fields from the
    result if the value is zero.
    
    The following counts remain:
    
     * ownmempooltix
     * immature
     * voted
     * revoked
    
    And two new fields have been added to allow SPV wallets to provide a
    fuller picture of the wallet's ticket state counts:
    
     * unspent
     * unspentexpired
    
    The `unspent` field describes the number of tickets that have gone
    live and have not been spent by a vote or revocation.  The
    `unspentexpired` field describes the number of unspent tickets that
    must certainly be revoked as they have not been spent by a vote and
    have passed the expiry period.  These tickets may have been called and
    missed, or actually expired, but a SPV wallet is aware that they must
    be revoked as they cannot possibly be live.
    
    These changes are being made due to SPV wallets being unaware of what
    state a matured ticket is in (whether live, picked, or missed) and
    because SPV wallets do not know the ticket pool size or the number of
    all unmined tickets.
    jrick committed Jul 3, 2018
    Configuration menu
    Copy the full SHA
    e62476c View commit details
    Browse the repository at this point in the history