From 2eba38051a83bad0a8fdd96736f42b95931025f7 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Tue, 5 Jan 2021 15:35:20 +0100 Subject: [PATCH] blockchain/v2: fix missing mutex unlock (#5862) Fixes #5843. --- blockchain/v2/reactor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockchain/v2/reactor.go b/blockchain/v2/reactor.go index f7af24808..9dea749d7 100644 --- a/blockchain/v2/reactor.go +++ b/blockchain/v2/reactor.go @@ -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(),