Apply go fmt updates to statediff pkg
This commit is contained in:
parent
b6dc2d509e
commit
16ee9a519a
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user