rpc: plumb shred_version through RpcContactInfo
This commit is contained in:
committed by
mergify[bot]
parent
26afc7620b
commit
67e6a3106f
@ -206,6 +206,8 @@ pub struct RpcContactInfo {
|
|||||||
pub version: Option<String>,
|
pub version: Option<String>,
|
||||||
/// First 4 bytes of the FeatureSet identifier
|
/// First 4 bytes of the FeatureSet identifier
|
||||||
pub feature_set: Option<u32>,
|
pub feature_set: Option<u32>,
|
||||||
|
/// Shred version
|
||||||
|
pub shred_version: Option<u16>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Map of leader base58 identity pubkeys to the slot indices relative to the first epoch slot
|
/// Map of leader base58 identity pubkeys to the slot indices relative to the first epoch slot
|
||||||
|
@ -2789,6 +2789,7 @@ pub mod rpc_full {
|
|||||||
rpc: valid_address_or_none(&contact_info.rpc),
|
rpc: valid_address_or_none(&contact_info.rpc),
|
||||||
version,
|
version,
|
||||||
feature_set,
|
feature_set,
|
||||||
|
shred_version: Some(my_shred_version),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None // Exclude spy nodes
|
None // Exclude spy nodes
|
||||||
@ -4074,7 +4075,7 @@ pub mod tests {
|
|||||||
.expect("actual response deserialization");
|
.expect("actual response deserialization");
|
||||||
|
|
||||||
let expected = format!(
|
let expected = format!(
|
||||||
r#"{{"jsonrpc":"2.0","result":[{{"pubkey": "{}", "gossip": "127.0.0.1:1235", "tpu": "127.0.0.1:1234", "rpc": "127.0.0.1:{}", "version": null, "featureSet": null}}],"id":1}}"#,
|
r#"{{"jsonrpc":"2.0","result":[{{"pubkey": "{}", "gossip": "127.0.0.1:1235", "shredVersion": 0, "tpu": "127.0.0.1:1234", "rpc": "127.0.0.1:{}", "version": null, "featureSet": null}}],"id":1}}"#,
|
||||||
leader_pubkey,
|
leader_pubkey,
|
||||||
rpc_port::DEFAULT_RPC_PORT
|
rpc_port::DEFAULT_RPC_PORT
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user