Open nak3 opened 7 years ago
Can you explain briefly why you want to make this change? Also we actually might increase the counter in getblock func. Moving the accounting to the caller might double count if you do not change getblock.
Sure, I explained it in the first comment.
prometheus: move promDistBlockPeerFailures to readFromPeer()
ReadLevel doesn't increment the promDistBlockPeerFailures when we set ReadSpread in current code. Since GetBlock() for remote peers are called in readFromPeer, this patch moves promDistBlockPeerFailures incrementation to readFromPeer()