Accounts with state (#954)
* Account type with state * fixed test according to @rob-solana
This commit is contained in:
committed by
GitHub
parent
db35f220f7
commit
c23fa289c3
@@ -1,12 +1,13 @@
|
||||
//! The `request` module defines the messages for the thin client.
|
||||
|
||||
use bank::Account;
|
||||
use hash::Hash;
|
||||
use signature::{Pubkey, Signature};
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(large_enum_variant))]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
|
||||
pub enum Request {
|
||||
GetBalance { key: Pubkey },
|
||||
GetAccount { key: Pubkey },
|
||||
GetLastId,
|
||||
GetTransactionCount,
|
||||
GetSignature { signature: Signature },
|
||||
@@ -22,9 +23,20 @@ impl Request {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum Response {
|
||||
Balance { key: Pubkey, val: i64 },
|
||||
LastId { id: Hash },
|
||||
TransactionCount { transaction_count: u64 },
|
||||
SignatureStatus { signature_status: bool },
|
||||
Finality { time: usize },
|
||||
Account {
|
||||
key: Pubkey,
|
||||
account: Option<Account>,
|
||||
},
|
||||
LastId {
|
||||
id: Hash,
|
||||
},
|
||||
TransactionCount {
|
||||
transaction_count: u64,
|
||||
},
|
||||
SignatureStatus {
|
||||
signature_status: bool,
|
||||
},
|
||||
Finality {
|
||||
time: usize,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user