Remove RpcSignatureStatus
This commit is contained in:
parent
f349c1f0dc
commit
4068612300
|
@ -3,8 +3,4 @@ pub mod mock_rpc_client_request;
|
|||
pub mod rpc_client;
|
||||
pub mod rpc_client_request;
|
||||
pub mod rpc_request;
|
||||
pub mod rpc_signature_status;
|
||||
pub mod thin_client;
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
//! The `rpc_signature_status` module defines transaction status codes
|
||||
|
||||
use jsonrpc_core::{Error, Result};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Serialize, Debug)]
|
||||
pub enum RpcSignatureStatus {
|
||||
AccountInUse,
|
||||
AccountLoadedTwice,
|
||||
Confirmed,
|
||||
GenericFailure,
|
||||
ProgramRuntimeError,
|
||||
SignatureNotFound,
|
||||
}
|
||||
|
||||
impl FromStr for RpcSignatureStatus {
|
||||
type Err = Error;
|
||||
|
||||
fn from_str(s: &str) -> Result<RpcSignatureStatus> {
|
||||
match s {
|
||||
"AccountInUse" => Ok(RpcSignatureStatus::AccountInUse),
|
||||
"AccountLoadedTwice" => Ok(RpcSignatureStatus::AccountLoadedTwice),
|
||||
"Confirmed" => Ok(RpcSignatureStatus::Confirmed),
|
||||
"GenericFailure" => Ok(RpcSignatureStatus::GenericFailure),
|
||||
"ProgramRuntimeError" => Ok(RpcSignatureStatus::ProgramRuntimeError),
|
||||
"SignatureNotFound" => Ok(RpcSignatureStatus::SignatureNotFound),
|
||||
_ => Err(Error::parse_error()),
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue