include headlag in func signature

This commit is contained in:
Anton Evangelatov 2020-07-03 19:22:04 +02:00
parent 8b88c17503
commit 4679c35e61
2 changed files with 2 additions and 4 deletions

View File

@ -72,5 +72,5 @@ func main() {
}
}
stats.Collect(ctx, api, influx, database, height)
stats.Collect(ctx, api, influx, database, height, headlag)
}

View File

@ -9,9 +9,7 @@ import (
client "github.com/influxdata/influxdb1-client/v2"
)
var headlag int = 3
func Collect(ctx context.Context, api api.FullNode, influx client.Client, database string, height int64) {
func Collect(ctx context.Context, api api.FullNode, influx client.Client, database string, height int64, headlag int) {
tipsetsCh, err := GetTips(ctx, api, abi.ChainEpoch(height), headlag)
if err != nil {
log.Fatal(err)