Archived
1
0
Fork 0

refactor: Use struct to parse API responses

- Return bytes for each request to the Flexpool API
- Delegate JSON marshalling the higher functions
- Use int64 when possible

BREAKING CHANGE: database structure has to be updated to use integer
instead of real. Please follow instructions to upgrade from 1.0 to 1.1.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-10-11 08:54:37 +02:00
commit ebbd4ac2cd
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
8 changed files with 133 additions and 65 deletions

View file

@ -132,7 +132,7 @@ func main() {
log.Warnf("Could not fetch unpaid balance: %v", err)
continue
}
log.Debugf("Unpaid balance %.0f", balance)
log.Debugf("Unpaid balance %d", balance)
miner.Balance = balance
if miner.Balance != dbMiner.Balance {
dbMiner.Balance = balance