Add parent slot to getConfirmedBlock (#7038)
* Add parent slot to getConfirmedBlock * Fix bad text-replace * Use camelCase in getConfirmedBlock
This commit is contained in:
parent
5b7bd24f0a
commit
ea656b1a3f
|
@ -23,9 +23,11 @@ pub struct Response<T> {
|
|||
}
|
||||
|
||||
#[derive(Debug, Default, PartialEq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RpcConfirmedBlock {
|
||||
pub previous_blockhash: Hash,
|
||||
pub blockhash: Hash,
|
||||
pub parent_slot: Slot,
|
||||
pub transactions: Vec<(Transaction, Option<RpcTransactionStatus>)>,
|
||||
}
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ pub trait RpcSol {
|
|||
#[rpc(meta, name = "setLogFilter")]
|
||||
fn set_log_filter(&self, _meta: Self::Metadata, filter: String) -> Result<()>;
|
||||
|
||||
#[rpc(meta, name = "getRpcConfirmedBlock")]
|
||||
#[rpc(meta, name = "getConfirmedBlock")]
|
||||
fn get_confirmed_block(
|
||||
&self,
|
||||
meta: Self::Metadata,
|
||||
|
|
|
@ -1148,6 +1148,7 @@ impl Blocktree {
|
|||
.expect("Rooted parent slot must have blockhash"),
|
||||
blockhash: get_last_hash(slot_entries.iter())
|
||||
.expect("Rooted slot must have blockhash"),
|
||||
parent_slot: slot_meta.parent_slot,
|
||||
transactions: self.map_transactions_to_statuses(slot, slot_transaction_iterator),
|
||||
};
|
||||
Ok(block)
|
||||
|
|
|
@ -124,6 +124,7 @@ fn get_program_ids(instructions: &[Instruction]) -> Vec<Pubkey> {
|
|||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Debug, PartialEq, Eq, Clone)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MessageHeader {
|
||||
/// The number of signatures required for this message to be considered valid. The
|
||||
/// signatures must match the first `num_required_signatures` of `account_keys`.
|
||||
|
@ -141,6 +142,7 @@ pub struct MessageHeader {
|
|||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Message {
|
||||
/// The message header, identifying signed and read-only `account_keys`
|
||||
/// NOTE: Serialization-related changes must be paired with the direct read at sigverify.
|
||||
|
|
Loading…
Reference in New Issue