diff options
Diffstat (limited to 'simulation/validator.go')
-rw-r--r-- | simulation/validator.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/simulation/validator.go b/simulation/validator.go index 302f3af..8a672c5 100644 --- a/simulation/validator.go +++ b/simulation/validator.go @@ -38,7 +38,7 @@ type Validator struct { db blockdb.BlockDatabase config config.Validator - msgChannel chan interface{} + msgChannel <-chan interface{} isFinished chan struct{} ID types.ValidatorID @@ -84,7 +84,8 @@ func (v *Validator) GetID() types.ValidatorID { // Run starts the validator. func (v *Validator) Run() { - v.msgChannel = v.network.Join(v) + v.network.Join(v) + v.msgChannel = v.network.ReceiveChan() hashes := make(common.Hashes, 0, v.network.NumPeers()) for _, vID := range v.network.Endpoints() { |