diff --git a/neo3fura_http/biz/job/job.GetActiveAddresses.go b/neo3fura_http/biz/job/job.GetActiveAddresses.go index ce91554..bbf6a24 100644 --- a/neo3fura_http/biz/job/job.GetActiveAddresses.go +++ b/neo3fura_http/biz/job/job.GetActiveAddresses.go @@ -2,6 +2,7 @@ package job import ( "encoding/json" + "go.mongodb.org/mongo-driver/bson" ) @@ -42,11 +43,8 @@ func (me T) GetActiveAddresses() error { for _, item := range r1 { r2[item["sender"].(string)] = true } - var i = 0 - for _, _ = range r2 { - i++ - } - data := bson.M{"ActiveAddresses": i} + + data := bson.M{"ActiveAddresses": len(r2), "insertTime": r0["blocktime"]} _, err = me.Client.SaveJob(struct { Collection string Data bson.M diff --git a/neo3fura_http/biz/job/job.GetDailyTransactions.go b/neo3fura_http/biz/job/job.GetDailyTransactions.go index ddbf37e..dcf2911 100644 --- a/neo3fura_http/biz/job/job.GetDailyTransactions.go +++ b/neo3fura_http/biz/job/job.GetDailyTransactions.go @@ -2,6 +2,7 @@ package job import ( "encoding/json" + "go.mongodb.org/mongo-driver/bson" ) @@ -38,7 +39,7 @@ func (me T) GetDailyTransactions() error { if err != nil { return err } - data := bson.M{"DailyTransactions": len(r1)} + data := bson.M{"DailyTransactions": len(r1), "insertTime": r0["blocktime"]} _, err = me.Client.SaveJob(struct { Collection string Data bson.M diff --git a/neo3fura_http/biz/job/job.GetNewAddresses.go b/neo3fura_http/biz/job/job.GetNewAddresses.go index f771732..6cf12bd 100644 --- a/neo3fura_http/biz/job/job.GetNewAddresses.go +++ b/neo3fura_http/biz/job/job.GetNewAddresses.go @@ -2,6 +2,7 @@ package job import ( "encoding/json" + "go.mongodb.org/mongo-driver/bson" ) @@ -34,7 +35,7 @@ func (me T) GetNewAddresses() error { return err } - data := bson.M{"NewAddresses": count} + data := bson.M{"NewAddresses": count, "insertTime": r0["blocktime"]} _, err = me.Client.SaveJob(struct { Collection string Data bson.M diff --git a/neo3fura_http/biz/job/job.GetPopularTokens.go b/neo3fura_http/biz/job/job.GetPopularTokens.go index e677b99..a0ea269 100644 --- a/neo3fura_http/biz/job/job.GetPopularTokens.go +++ b/neo3fura_http/biz/job/job.GetPopularTokens.go @@ -2,6 +2,7 @@ package job import ( "encoding/json" + "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" ) @@ -77,7 +78,7 @@ func (me T) GetPopularTokens() error { } } - data := bson.M{"Populars": values} + data := bson.M{"Populars": values, "insertTime": r0["timestamp"]} _, err = me.Client.SaveJob(struct { Collection string Data bson.M