Do some cleanups (#14608)

* Do some cleanups

Found them while looking over the code.

* More

* Fix
This commit is contained in:
Bastian Köcher
2023-07-21 23:54:01 +02:00
committed by GitHub
parent 98304ee957
commit b16976053e
9 changed files with 39 additions and 45 deletions
@@ -16,7 +16,7 @@
//! Helper for handling (i.e. answering) BEEFY justifications requests from a remote peer.
use codec::Decode;
use codec::DecodeAll;
use futures::{channel::oneshot, StreamExt};
use log::{debug, error, trace};
use sc_client_api::BlockBackend;
@@ -77,7 +77,7 @@ impl<B: Block> IncomingRequest<B> {
F: FnOnce(usize) -> Vec<ReputationChange>,
{
let netconfig::IncomingRequest { payload, peer, pending_response } = raw;
let payload = match JustificationRequest::decode(&mut payload.as_ref()) {
let payload = match JustificationRequest::decode_all(&mut payload.as_ref()) {
Ok(payload) => payload,
Err(err) => {
let response = netconfig::OutgoingResponse {