mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
Merge remote-tracking branch 'upstream/unstable'
This commit is contained in:
@@ -5,6 +5,7 @@ use derivative::Derivative;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz::{Decode, DecodeError};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::fmt;
|
||||
use std::marker::PhantomData;
|
||||
use superstruct::superstruct;
|
||||
use test_random_derive::TestRandom;
|
||||
@@ -869,6 +870,23 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> ForkVersionDeserialize
|
||||
))
|
||||
}
|
||||
}
|
||||
pub enum BlockImportSource {
|
||||
Gossip,
|
||||
Lookup,
|
||||
RangeSync,
|
||||
HttpApi,
|
||||
}
|
||||
|
||||
impl fmt::Display for BlockImportSource {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
BlockImportSource::Gossip => write!(f, "gossip"),
|
||||
BlockImportSource::Lookup => write!(f, "lookup"),
|
||||
BlockImportSource::RangeSync => write!(f, "range_sync"),
|
||||
BlockImportSource::HttpApi => write!(f, "http_api"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@@ -130,7 +130,7 @@ pub use crate::attester_slashing::{
|
||||
pub use crate::beacon_block::{
|
||||
BeaconBlock, BeaconBlockAltair, BeaconBlockBase, BeaconBlockBellatrix, BeaconBlockCapella,
|
||||
BeaconBlockDeneb, BeaconBlockElectra, BeaconBlockRef, BeaconBlockRefMut, BlindedBeaconBlock,
|
||||
EmptyBlock,
|
||||
BlockImportSource, EmptyBlock,
|
||||
};
|
||||
pub use crate::beacon_block_body::{
|
||||
BeaconBlockBody, BeaconBlockBodyAltair, BeaconBlockBodyBase, BeaconBlockBodyBellatrix,
|
||||
|
||||
Reference in New Issue
Block a user