sc-network-common 0.56.0
“Substrate network common”
Large registry install base (10k+ downloads)Package is at least one year old
SHA-2560922f62c734443338d987db52c65d91d2a0c25cd63ef017b0b70615fb0fd3c85
MaleculeH(Db)Md
Evidence
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
5
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at you …
9:36… on.
10
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http …
19:64… into the lower level protocol
20//! payload.
21
22use crate::role::Roles;
23
24use bitflags::bitflags;
25use codec::{Decode, Encode, Error, Input, Output};
26pub use generic::{BlockAnnounce, FromBlock};
27use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
28
29/// Type alias for using the block request type using block type parameters.
30pub type BlockRequest<B> =
31 generic …
68:22… ncoded: u32) -> Result<Self, Error> {
69 Self::from_bits(encoded.to_be_bytes()[0])
70 .ok_or_else(|| Error::from("Invalid BlockAttributes"))
71 }
⋯4 lines
126:3… / Generic types.
127pub mod generic {
128 use super::{BlockAttributes, BlockState, Direction};
129 use crate::message::RequestId;
130 use codec::{Decode, Encode, Input, Output};
131 use sp_runtime::{EncodedJustification, Justifications};
132
133 /// Block data sent in the response.
134 #[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
135 pub struc …
No evidence locations were recorded for this file. Raw result