forward error to signarture subscribers
This commit is contained in:
parent
c368ac5fa2
commit
ddf57170ca
|
@ -10,10 +10,7 @@ use solana_client::{
|
||||||
rpc_config::{RpcBlockSubscribeConfig, RpcBlockSubscribeFilter},
|
rpc_config::{RpcBlockSubscribeConfig, RpcBlockSubscribeFilter},
|
||||||
rpc_response::{Response as RpcResponse, RpcResponseContext},
|
rpc_response::{Response as RpcResponse, RpcResponseContext},
|
||||||
};
|
};
|
||||||
use solana_sdk::{
|
use solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel};
|
||||||
commitment_config::{CommitmentConfig, CommitmentLevel},
|
|
||||||
transaction::TransactionError,
|
|
||||||
};
|
|
||||||
|
|
||||||
use solana_transaction_status::{
|
use solana_transaction_status::{
|
||||||
TransactionConfirmationStatus, TransactionStatus, UiTransactionStatusMeta,
|
TransactionConfirmationStatus, TransactionStatus, UiTransactionStatusMeta,
|
||||||
|
@ -161,7 +158,7 @@ impl BlockListener {
|
||||||
slot,
|
slot,
|
||||||
confirmations: None, //TODO: talk about this
|
confirmations: None, //TODO: talk about this
|
||||||
status,
|
status,
|
||||||
err,
|
err: err.clone(),
|
||||||
confirmation_status: Some(comfirmation_status.clone()),
|
confirmation_status: Some(comfirmation_status.clone()),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -175,7 +172,7 @@ impl BlockListener {
|
||||||
slot,
|
slot,
|
||||||
api_version: None,
|
api_version: None,
|
||||||
},
|
},
|
||||||
value: serde_json::json!({ "err": None::<TransactionError> }),
|
value: serde_json::json!({ "err": err }),
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue