Fix blockchain pool tests

This commit is contained in:
Jae Kwon
2015-09-11 21:09:00 -07:00
parent 625f23af13
commit 3a5741f70f
3 changed files with 37 additions and 14 deletions
@@ -72,6 +72,13 @@ func (m *Monitor) Update(n int) int {
return n
}
// Hack to set the current rEMA.
func (m *Monitor) SetREMA(rEMA float64) {
m.mu.Lock()
m.rEMA = rEMA
m.mu.Unlock()
}
// IO is a convenience method intended to wrap io.Reader and io.Writer method
// execution. It calls m.Update(n) and then returns (n, err) unmodified.
func (m *Monitor) IO(n int, err error) (int, error) {