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
16
UPGRADES.md
16
UPGRADES.md
|
|
@ -1,9 +1,19 @@
|
|||
# General notes
|
||||
|
||||
In the next commands, you should replace `flexassistant.db` by the content of the `database_file` setting if it's has been changed.
|
||||
|
||||
# 1.2 to 1.3
|
||||
|
||||
The balance has reached maximum of **int64** type so the column should be converted to **real** to handle large numbers:
|
||||
|
||||
```
|
||||
sqlite3 flexassistant.db < migrations/1.2_to_1.3.sql
|
||||
```
|
||||
|
||||
# 1.0 to 1.1
|
||||
|
||||
Some numeric types have been updated from **float64** to **int64**. Upgrade the database types by running the following migration:
|
||||
|
||||
```
|
||||
sqlite3 flexassistant.db < migrations/1.0_to_1.1.sql
|
||||
```
|
||||
|
||||
And replace `flexassistant.db` by the content of the `database_file` setting if it's has been changed.
|
||||
```
|
||||
Reference in a new issue