mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
Rename to has_feature
This commit is contained in:
@@ -162,7 +162,7 @@ pub struct ExecutionBlock {
|
||||
feature_type(
|
||||
name = "FeatureName",
|
||||
list = "list_all_features",
|
||||
check = "is_feature_enabled"
|
||||
check = "has_feature"
|
||||
),
|
||||
variant_attributes(
|
||||
derive(Clone, Debug, PartialEq, Serialize, Deserialize,),
|
||||
@@ -440,7 +440,7 @@ pub struct ProposeBlindedBlockResponse {
|
||||
feature_type(
|
||||
name = "FeatureName",
|
||||
list = "list_all_features",
|
||||
check = "is_feature_enabled"
|
||||
check = "has_feature"
|
||||
),
|
||||
variant_attributes(derive(Clone, Debug, PartialEq),),
|
||||
map_into(ExecutionPayload),
|
||||
|
||||
@@ -1217,13 +1217,13 @@ impl HttpJsonRpc {
|
||||
payload_id: PayloadId,
|
||||
) -> Result<GetPayloadResponse<E>, Error> {
|
||||
let engine_capabilities = self.get_engine_capabilities(None).await?;
|
||||
if fork_name.is_feature_enabled(FeatureName::Deneb) {
|
||||
if fork_name.has_feature(FeatureName::Deneb) {
|
||||
if engine_capabilities.get_payload_v3 {
|
||||
self.get_payload_v3(fork_name, payload_id).await
|
||||
} else {
|
||||
Err(Error::RequiredMethodUnsupported("engine_getPayloadV3"))
|
||||
}
|
||||
} else if fork_name.is_feature_enabled(FeatureName::Bellatrix) {
|
||||
} else if fork_name.has_feature(FeatureName::Bellatrix) {
|
||||
if engine_capabilities.get_payload_v2 {
|
||||
self.get_payload_v2(fork_name, payload_id).await
|
||||
} else if engine_capabilities.new_payload_v1 {
|
||||
|
||||
@@ -20,7 +20,7 @@ use types::{
|
||||
feature_type(
|
||||
name = "FeatureName",
|
||||
list = "list_all_features",
|
||||
check = "is_feature_enabled"
|
||||
check = "has_feature"
|
||||
),
|
||||
variant_attributes(derive(Clone, Debug, PartialEq),),
|
||||
map_into(ExecutionPayload),
|
||||
|
||||
@@ -479,7 +479,7 @@ pub fn serve<E: EthSpec>(
|
||||
let prev_randao = head_state
|
||||
.get_randao_mix(head_state.current_epoch())
|
||||
.map_err(|_| reject("couldn't get prev randao"))?;
|
||||
let expected_withdrawals = if fork.is_feature_enabled(FeatureName::Capella) {
|
||||
let expected_withdrawals = if fork.has_feature(FeatureName::Capella) {
|
||||
Some(
|
||||
builder
|
||||
.beacon_client
|
||||
|
||||
Reference in New Issue
Block a user