decred / dcrticketbuyer

An automated smart ticket purchaser.
0 stars 7 forks source link

wrong final spendable balance #69

Closed raedah closed 7 years ago

raedah commented 7 years ago

The 'Final spendable balance' that dcrticketbuyer shows is not the same as what 'getbalance' shows from dcrctl.

This is a recurrence of https://github.com/decred/dcrticketbuyer/issues/21

raedah commented 7 years ago

https://github.com/decred/dcrticketbuyer/blob/master/buyer.go#L452

couldBuy := math.Floor((balSpendable.ToCoin() + balSpent) / nextStakeDiff.ToCoin())

What we 'couldBuy' is what we have to spend + what we already spent. ?

and at https://github.com/decred/dcrticketbuyer/blob/master/buyer.go#L509

thats what it is set to. t.toBuyDiffPeriod = int(float64(couldBuy))

raedah commented 7 years ago

This was resolved with the removal of the ticket queue.