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

Fixes #5843.
This commit is contained in:
Erik Grinaker
2021-01-06 17:27:51 +01:00
committed by Erik Grinaker
parent 15eed81f12
commit 2eba38051a
+1 -1
View File
@@ -500,12 +500,12 @@ 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 {
r.logger.Error("error transitioning block from protobuf", "err", err)
return
}
r.mtx.RLock()
if r.events != nil {
r.events <- bcBlockResponse{
peerID: src.ID(),