pub struct GetblockfrompeerParams {
pub blockhash: BlockHash,
pub peer_id: i64,
}Expand description
Attempt to fetch block from a given peer. We must have the header for this block, e.g. using submitheader. The block will not have any undo data which can limit the usage of the block data in a context where the undo data is needed. Subsequent calls for the same block may cause the response from the previous peer to be ignored. Peers generally ignore requests for a stale block that they never fully verified, or one that is more than a month old. When a peer does not respond with a block, we will disconnect. Note: The block could be re-pruned as soon as it is received. Returns an empty JSON object if the request was successfully scheduled.
Fields§
§blockhash: BlockHashThe block hash to try to fetch
peer_id: i64The peer to fetch it from (see getpeerinfo for peer IDs)
Trait Implementations§
Source§impl Debug for GetblockfrompeerParams
impl Debug for GetblockfrompeerParams
Auto Trait Implementations§
impl Freeze for GetblockfrompeerParams
impl RefUnwindSafe for GetblockfrompeerParams
impl Send for GetblockfrompeerParams
impl Sync for GetblockfrompeerParams
impl Unpin for GetblockfrompeerParams
impl UnwindSafe for GetblockfrompeerParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more