0xB10C / bademeister-go

Implementation of Bademeister, a mempool watcher and recorder, in Golang.
0 stars 3 forks source link

Parse ZMQ messages asynchronously #16

Closed OttoAllmendinger closed 5 years ago

OttoAllmendinger commented 5 years ago

Parsing a block can take long enough to stall the queue and introduce an error in the collected timestamps. This change moves the message parsing into a dedicated goroutine.

Also make some provisions for parse errors.

OttoAllmendinger commented 5 years ago

actually this has a (classic) bug: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables

no it doesn't

OttoAllmendinger commented 5 years ago

@0xB10C see latest commit