fix broken counter

This commit is contained in:
Anton Evangelatov 2020-06-29 17:21:50 +02:00
parent 909c12c6b4
commit 0ec247de8c

View File

@ -54,7 +54,9 @@ func runMiner(t *TestEnvironment) error {
ch := make(chan struct{})
err := miner.MineOne(ctx, func(mined bool) {
t.D().Counter(fmt.Sprintf("block.mine,miner=%s", myActorAddr)).Inc(1)
if mined {
t.D().Counter(fmt.Sprintf("block.mine,miner=%s", myActorAddr)).Inc(1)
}
close(ch)
})
if err != nil {