Statediff for full node #6
@ -3,6 +3,8 @@ package mocks
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/ethereum/go-ethereum/core"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
@ -45,6 +47,7 @@ func (bc *BlockChain) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subsc
|
|||||||
subscription := event.NewSubscription(func(quit <-chan struct{}) error {
|
subscription := event.NewSubscription(func(quit <-chan struct{}) error {
|
||||||
for _, chainEvent := range bc.ChainEvents {
|
for _, chainEvent := range bc.ChainEvents {
|
||||||
if eventCounter > 1 {
|
if eventCounter > 1 {
|
||||||
|
time.Sleep(250 * time.Millisecond)
|
||||||
return subErr
|
return subErr
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user