From d78a5e0a9f5bbc50f1f6c595702dbe2fd4b7a128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 13 Jan 2020 14:01:11 +0100 Subject: [PATCH] Decimal types for some miner columns --- cmd/lotus-chainwatch/storage.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/lotus-chainwatch/storage.go b/cmd/lotus-chainwatch/storage.go index cede11e84..af74f2765 100644 --- a/cmd/lotus-chainwatch/storage.go +++ b/cmd/lotus-chainwatch/storage.go @@ -2,6 +2,7 @@ package main import ( "database/sql" + "fmt" "github.com/filecoin-project/lotus/api" "golang.org/x/xerrors" "sync" @@ -178,9 +179,9 @@ create table if not exists miner_heads addr text not null, stateroot text not null, sectorset text not null, - setsize bigint not null, + setsize decimal not null, provingset text not null, - provingsize bigint not null, + provingsize decimal not null, owner text not null, worker text not null, peerid text not null, @@ -290,9 +291,9 @@ create temp table mh (like miner_heads excluding constraints) on commit drop; k.addr.String(), k.stateroot.String(), i.state.Sectors.String(), - i.ssize, + fmt.Sprint(i.ssize), i.state.ProvingSet.String(), - i.psize, + fmt.Sprint(i.psize), i.info.Owner.String(), i.info.Worker.String(), i.info.PeerID.String(),