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:
Anatoly Yakovenko
2018-08-10 21:13:34 -07:00
committed by Rob Walker
parent fc0d7f5982
commit a284030ecc
10 changed files with 323 additions and 192 deletions

View File

@@ -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 => {