decred / dcrticketbuyer

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

Move purchase to pkg ticketbuyer #70

Closed tuxcanfly closed 7 years ago

tuxcanfly commented 7 years ago

Refactored to move the purchase logic to a new reusable pkg.

alexlyp commented 7 years ago

not sure all the logic is correct: 21:42:42 2016-11-10 [DBG] TKBY: Current spendable balance at height 202863 for account 'default': 25445.61588345 Coin 21:42:42 2016-11-10 [TRC] TKBY: Current balance 2544561588345 is greater than estimated balance: 0

alexlyp commented 7 years ago

It's currently not updating webui when new blocks connect.

Current block height is 217093, but still sitting at 217069 on :8000

tuxcanfly commented 7 years ago

@alexlyp Thanks for catching that. Looks like the global for height was not being set and that lead to duplicate rows in the csv with the old height.

I have refactored to do away with the globals and instead use a file to read and write the shared data. Removed the unnecessary atomics and mutexes which were not being used properly in the first place.

My initial tests seem to suggest that the webui and csv bits are working as before. Will be running some more tests.

Also, I think it would be better to break this PR down into two for easier review. One to deal with the preparation leading up to the refactor (without any functional changes) and one for the new pkg refactor itself. Let me know if that would help.

Thanks.

tuxcanfly commented 7 years ago

This has been implemented in https://github.com/decred/dcrwallet/pull/374