Dd-10: V0.1.3 (05/10/16)

Discussion in 'Development Dispatches' started by tacotime, May 11, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. ceejep

    ceejep Sr. Member
    Developer

    Dec 14, 2015
    192
    220
    That sounds like an integer underflow bug. BatchRollback for the address pool will move the index to fetch back, and in your case it sounds like it moved it to be <0. Does it continue to do this on restart?
     
  2. Beoga

    Beoga New Member

    Mar 2, 2016
    30
    0
    yes, after restart I can't get address as well:
    [​IMG]

    But wallet works good:
    [​IMG]
     
  3. ceejep

    ceejep Sr. Member
    Developer

    Dec 14, 2015
    192
    220
    I see. As expected, it's an underflow of uint32. Specifically:

    https://github.com/decred/dcrwallet/blob/master/wallet/wallet.go#L1346-L1352

    The function you call looks for the last address given to the user for your default account. Your wallet is unused, so there is no last address. 0 is returned for the nextToUseIdx, then that is decremented by 1 to give 2^32-1. It should catch this case and return an error to the user telling them that the account is unused.

    To get a new address for this account, use the correct API call "getnewaddress <account>".

    An issue has been opened here: https://github.com/decred/dcrwallet/issues/250
     
    Beoga likes this.
  4. Beoga

    Beoga New Member

    Mar 2, 2016
    30
    0
    Thank you very much!
     

Share This Page