add parse option

pull/1/head
Jan Pochyla 2017-10-07 11:05:35 +02:00
parent d7a159a837
commit aa1b6c2b89
1 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,7 @@ var (
syncChunk = flag.Int("chunk", 100, "block chunk size for processing")
syncWorkers = flag.Int("workers", 8, "number of workers to process blocks")
dryRun = flag.Bool("dryrun", false, "do not index blocks, only download")
parse = flag.Bool("parse", false, "use in-process block parsing")
)
func main() {
@ -70,6 +71,12 @@ func main() {
*rpcPass,
time.Duration(*rpcTimeout)*time.Second)
if *parse {
rpc.Parser = &BitcoinBlockParser{
Params: GetChainParams()[0],
}
}
db, err := NewRocksDB(*dbPath)
if err != nil {
log.Fatal(err)