Account type with state
comments fixups! fixups! fixups for a real Result<> from get_balance() on 2nd thought, be more rigorous Merge branch 'rob-solana-accounts_with_state' into accounts_with_state update review comments comments get rid of option
This commit is contained in:
committed by
Rob Walker
parent
fc0d7f5982
commit
a284030ecc
@@ -22,10 +22,10 @@ impl RequestProcessor {
|
||||
rsp_addr: SocketAddr,
|
||||
) -> Option<(Response, SocketAddr)> {
|
||||
match msg {
|
||||
Request::GetBalance { key } => {
|
||||
let val = self.bank.get_balance(&key);
|
||||
let rsp = (Response::Balance { key, val }, rsp_addr);
|
||||
info!("Response::Balance {:?}", rsp);
|
||||
Request::GetAccount { key } => {
|
||||
let account = self.bank.get_account(&key);
|
||||
let rsp = (Response::Account { key, account }, rsp_addr);
|
||||
info!("Response::Account {:?}", rsp);
|
||||
Some(rsp)
|
||||
}
|
||||
Request::GetLastId => {
|
||||
|
Reference in New Issue
Block a user