Apply go fmt updates to statediff pkg

This commit is contained in:
Elizabeth Engelman 2019-01-28 12:48:34 -06:00
parent b6dc2d509e
commit 16ee9a519a
2 changed files with 14 additions and 14 deletions

View File

@ -58,20 +58,20 @@ func (sds *StateDiffService) Loop(chainEventCh chan core.ChainEvent) {
quitCh := make(chan struct{})
go func() {
HandleLoop:
for {
select {
//Notify chain event channel of events
case chainEvent := <-chainEventCh:
log.Debug("Event received from chainEventCh", "event", chainEvent)
blocksCh <- chainEvent.Block
//if node stopped
case err := <-errCh:
log.Debug("Error from chain event subscription, breaking loop.", "error", err)
break HandleLoop
}
HandleLoop:
for {
select {
//Notify chain event channel of events
case chainEvent := <-chainEventCh:
log.Debug("Event received from chainEventCh", "event", chainEvent)
blocksCh <- chainEvent.Block
//if node stopped
case err := <-errCh:
log.Debug("Error from chain event subscription, breaking loop.", "error", err)
break HandleLoop
}
close(quitCh)
}
close(quitCh)
}()
//loop through chain events until no more

View File

@ -1,11 +1,11 @@
package mocks
import (
"errors"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"errors"
)
type BlockChain struct {