Fix crash in fullnode when poll_get_balance() returns error (#1058)

This commit is contained in:
Pankaj Garg
2018-08-25 15:25:13 -07:00
committed by anatoly yakovenko
parent d3fac8a06f
commit ad159e0906

View File

@@ -118,7 +118,7 @@ fn main() -> () {
// out after 1 second, and sometimes this is not enough time while the network is // out after 1 second, and sometimes this is not enough time while the network is
// booting // booting
let balance_ok = (0..30).any(|i| { let balance_ok = (0..30).any(|i| {
let balance = client.poll_get_balance(&leader_pubkey).unwrap(); let balance = client.poll_get_balance(&leader_pubkey).unwrap_or(0);
eprintln!("new balance is {} (attempt #{})", balance, i); eprintln!("new balance is {} (attempt #{})", balance, i);
balance > 0 balance > 0
}); });