forward error to signarture subscribers

This commit is contained in:
Aniket Prajapati 2023-01-11 01:37:42 +05:30
parent c368ac5fa2
commit ddf57170ca
No known key found for this signature in database
GPG Key ID: D4346D8C9C5398F2
1 changed files with 3 additions and 6 deletions

View File

@ -10,10 +10,7 @@ use solana_client::{
rpc_config::{RpcBlockSubscribeConfig, RpcBlockSubscribeFilter},
rpc_response::{Response as RpcResponse, RpcResponseContext},
};
use solana_sdk::{
commitment_config::{CommitmentConfig, CommitmentLevel},
transaction::TransactionError,
};
use solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel};
use solana_transaction_status::{
TransactionConfirmationStatus, TransactionStatus, UiTransactionStatusMeta,
@ -161,7 +158,7 @@ impl BlockListener {
slot,
confirmations: None, //TODO: talk about this
status,
err,
err: err.clone(),
confirmation_status: Some(comfirmation_status.clone()),
});
};
@ -175,7 +172,7 @@ impl BlockListener {
slot,
api_version: None,
},
value: serde_json::json!({ "err": None::<TransactionError> }),
value: serde_json::json!({ "err": err }),
})
.unwrap();
}