mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
cargo +nightly fmt (#3540)
* cargo +nightly fmt * add cargo-fmt check to ci * update ci * fmt * fmt * skip macro * ignore bridges
This commit is contained in:
@@ -18,12 +18,14 @@
|
||||
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
|
||||
use polkadot_primitives::v1::{CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::v1::Id as ParaId;
|
||||
use polkadot_node_primitives::{AvailableData, DisputeMessage, ErasureChunk, PoV, UncheckedDisputeMessage};
|
||||
use polkadot_node_primitives::{
|
||||
AvailableData, DisputeMessage, ErasureChunk, PoV, UncheckedDisputeMessage,
|
||||
};
|
||||
use polkadot_primitives::v1::{
|
||||
CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, Id as ParaId, ValidatorIndex,
|
||||
};
|
||||
|
||||
use super::request::IsRequest;
|
||||
use super::Protocol;
|
||||
use super::{request::IsRequest, Protocol};
|
||||
|
||||
/// Request an availability chunk.
|
||||
#[derive(Debug, Copy, Clone, Encode, Decode)]
|
||||
@@ -69,19 +71,15 @@ pub struct ChunkResponse {
|
||||
}
|
||||
|
||||
impl From<ErasureChunk> for ChunkResponse {
|
||||
fn from(ErasureChunk {chunk, index: _, proof}: ErasureChunk) -> Self {
|
||||
ChunkResponse {chunk, proof}
|
||||
fn from(ErasureChunk { chunk, index: _, proof }: ErasureChunk) -> Self {
|
||||
ChunkResponse { chunk, proof }
|
||||
}
|
||||
}
|
||||
|
||||
impl ChunkResponse {
|
||||
/// Re-build an `ErasureChunk` from response and request.
|
||||
pub fn recombine_into_chunk(self, req: &ChunkFetchingRequest) -> ErasureChunk {
|
||||
ErasureChunk {
|
||||
chunk: self.chunk,
|
||||
proof: self.proof,
|
||||
index: req.index,
|
||||
}
|
||||
ErasureChunk { chunk: self.chunk, proof: self.proof, index: req.index }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +208,7 @@ impl From<DisputeMessage> for DisputeRequest {
|
||||
pub enum DisputeResponse {
|
||||
/// Recipient successfully processed the dispute request.
|
||||
#[codec(index = 0)]
|
||||
Confirmed
|
||||
Confirmed,
|
||||
}
|
||||
|
||||
impl IsRequest for DisputeRequest {
|
||||
|
||||
Reference in New Issue
Block a user