kopia lustrzana https://github.com/bugout-dev/moonstream
Fixes
rodzic
d55209df42
commit
1473ca3b40
|
@ -8,8 +8,6 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
// "github.com/bugout-dev/moonstream/crawlers/ldb/configs"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
|
@ -61,7 +59,7 @@ func BlockYield(start, end, blockStep uint64) chan []uint64 {
|
||||||
|
|
||||||
var blocks []uint64
|
var blocks []uint64
|
||||||
for i := currentBlock; i < tempEnd; i++ {
|
for i := currentBlock; i < tempEnd; i++ {
|
||||||
blocks = append(blocks, i) // Block operation
|
blocks = append(blocks, i) // Blocking operation
|
||||||
}
|
}
|
||||||
ch <- blocks
|
ch <- blocks
|
||||||
|
|
||||||
|
@ -75,7 +73,6 @@ func BlockYield(start, end, blockStep uint64) chan []uint64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse start and end blocks from command line input
|
// Parse start and end blocks from command line input
|
||||||
// TODO(kompotkot): Re-write to work via channel in goroutines
|
|
||||||
func startEndBlock(ctx *cli.Context) (uint64, uint64, error) {
|
func startEndBlock(ctx *cli.Context) (uint64, uint64, error) {
|
||||||
inputStart, err := strconv.ParseUint(ctx.Args().Get(0), 10, 32)
|
inputStart, err := strconv.ParseUint(ctx.Args().Get(0), 10, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -59,7 +59,7 @@ type Job struct {
|
||||||
Results chan<- Result
|
Results chan<- Result
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(kompotkot): Find way to remove Number
|
// TODO(kompotkot): Find way to remove Number, it repeats Job
|
||||||
type Result struct {
|
type Result struct {
|
||||||
ErrorOutput string
|
ErrorOutput string
|
||||||
ErrorSource string
|
ErrorSource string
|
||||||
|
|
Ładowanie…
Reference in New Issue