@ -57,7 +57,10 @@ pub struct JsonRpcConfig {
|
|||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct RpcSignatureStatusConfig {
|
pub struct RpcSignatureStatusConfig {
|
||||||
pub search_transaction_history: bool,
|
pub search_transaction_history: Option<bool>,
|
||||||
|
// DEPRECATED
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub commitment: Option<CommitmentConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@ -440,10 +443,16 @@ impl JsonRpcRequestProcessor {
|
|||||||
) -> RpcResponse<Vec<Option<TransactionStatus>>> {
|
) -> RpcResponse<Vec<Option<TransactionStatus>>> {
|
||||||
let mut statuses: Vec<Option<TransactionStatus>> = vec![];
|
let mut statuses: Vec<Option<TransactionStatus>> = vec![];
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
|
let commitment = config
|
||||||
|
.clone()
|
||||||
|
.and_then(|x| x.commitment)
|
||||||
|
.or_else(|| Some(CommitmentConfig::recent()));
|
||||||
|
|
||||||
let search_transaction_history = config
|
let search_transaction_history = config
|
||||||
.map(|x| x.search_transaction_history)
|
.and_then(|x| x.search_transaction_history)
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
let bank = self.bank(Some(CommitmentConfig::recent()));
|
let bank = self.bank(commitment);
|
||||||
|
|
||||||
for signature in signatures {
|
for signature in signatures {
|
||||||
let status = if let Some(status) = self.get_transaction_status(signature, &bank) {
|
let status = if let Some(status) = self.get_transaction_status(signature, &bank) {
|
||||||
|
Reference in New Issue
Block a user