Add ConfirmedBlock struct, and rework Blocktree apis to include block… (#7004)
* Add RpcConfirmedBlock struct, and rework Blocktree apis to include blockhash info and dummy tx statuses * Remove unused lifetime
This commit is contained in:
@ -3,6 +3,8 @@ use serde_json::{json, Value};
|
||||
use solana_sdk::{
|
||||
clock::{Epoch, Slot},
|
||||
commitment_config::CommitmentConfig,
|
||||
hash::Hash,
|
||||
transaction::{Result, Transaction},
|
||||
};
|
||||
use std::{error, fmt, io, net::SocketAddr};
|
||||
|
||||
@ -20,6 +22,13 @@ pub struct Response<T> {
|
||||
pub value: T,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, PartialEq, Serialize)]
|
||||
pub struct RpcConfirmedBlock {
|
||||
pub previous_blockhash: Hash,
|
||||
pub blockhash: Hash,
|
||||
pub transactions: Vec<(Transaction, Result<()>)>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct RpcContactInfo {
|
||||
/// Pubkey of the node as a base-58 string
|
||||
|
Reference in New Issue
Block a user