fix: Convert big integers to float64
Large numbers can be returned by the Flexpool API reaching the `int64` limit. Blocks reward were seen as 0 ETH. Using `float64` instead. Also converting signed int64 to unsigned int64 for non-timestamp numbers. BREAKING CHANGE: please follow the upgrades instructions from 1.2 to 1.3 to convert such types in the database. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
ac0903cf9d
commit
3d4c049323
7 changed files with 63 additions and 25 deletions
2
main.go
2
main.go
|
@ -132,7 +132,7 @@ func main() {
|
|||
log.Warnf("Could not fetch unpaid balance: %v", err)
|
||||
continue
|
||||
}
|
||||
log.Debugf("Unpaid balance %d", balance)
|
||||
log.Debugf("Unpaid balance %.0f", balance)
|
||||
miner.Balance = balance
|
||||
if miner.Balance != dbMiner.Balance {
|
||||
dbMiner.Balance = balance
|
||||
|
|
Reference in a new issue