Struct ckb_jsonrpc_types::UncleBlock
source · [−]pub struct UncleBlock {
pub header: Header,
pub proposals: Vec<ProposalShortId>,
}
Expand description
The uncle block used as a parameter in the RPC.
The chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.
A block B1 is considered to be the uncle of another block B2 if all the following conditions are met:
- They are in the same epoch, sharing the same difficulty;
- B2 block number is larger than B1;
- B1’s parent is either B2’s ancestor or an uncle embedded in B2 or any of B2’s ancestors.
- B2 is the first block in its chain to refer to B1.
Fields
header: Header
The uncle block header.
proposals: Vec<ProposalShortId>
Proposal IDs in the uncle block body.
Trait Implementations
sourceimpl Clone for UncleBlock
impl Clone for UncleBlock
sourcefn clone(&self) -> UncleBlock
fn clone(&self) -> UncleBlock
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UncleBlock
impl Debug for UncleBlock
sourceimpl Default for UncleBlock
impl Default for UncleBlock
sourcefn default() -> UncleBlock
fn default() -> UncleBlock
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for UncleBlock
impl<'de> Deserialize<'de> for UncleBlock
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<UncleBlock> for UncleBlock
impl From<UncleBlock> for UncleBlock
sourcefn from(input: UncleBlock) -> Self
fn from(input: UncleBlock) -> Self
Converts to this type from the input type.
sourceimpl From<UncleBlock> for UncleBlock
impl From<UncleBlock> for UncleBlock
sourcefn from(json: UncleBlock) -> Self
fn from(json: UncleBlock) -> Self
Converts to this type from the input type.
sourceimpl Hash for UncleBlock
impl Hash for UncleBlock
sourceimpl PartialEq<UncleBlock> for UncleBlock
impl PartialEq<UncleBlock> for UncleBlock
sourcefn eq(&self, other: &UncleBlock) -> bool
fn eq(&self, other: &UncleBlock) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UncleBlock) -> bool
fn ne(&self, other: &UncleBlock) -> bool
This method tests for !=
.
sourceimpl Serialize for UncleBlock
impl Serialize for UncleBlock
impl Eq for UncleBlock
impl StructuralEq for UncleBlock
impl StructuralPartialEq for UncleBlock
Auto Trait Implementations
impl RefUnwindSafe for UncleBlock
impl Send for UncleBlock
impl Sync for UncleBlock
impl Unpin for UncleBlock
impl UnwindSafe for UncleBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more