Browse Source

blockchain/v2: fix missing mutex unlock (#5862)

Fixes #5843.
pull/5867/head
Erik Grinaker 4 years ago
committed by GitHub
parent
commit
1e1d087494
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      blockchain/v2/reactor.go

+ 1
- 1
blockchain/v2/reactor.go View File

@ -508,13 +508,13 @@ func (r *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) {
r.mtx.RUnlock()
case *bcproto.BlockResponse:
r.mtx.RLock()
bi, err := types.BlockFromProto(msg.Block)
if err != nil {
logger.Error("error transitioning block from protobuf", "err", err)
_ = r.reporter.Report(behaviour.BadMessage(src.ID(), err.Error()))
return
}
r.mtx.RLock()
if r.events != nil {
r.events <- bcBlockResponse{
peerID: src.ID(),


Loading…
Cancel
Save