fixed panic on empty remote read request (#4619)

This commit is contained in:
Svyatoslav Nikolsky
2020-01-14 18:49:46 +03:00
committed by GitHub
parent 3219be2508
commit afba48aeba
2 changed files with 16 additions and 2 deletions
@@ -325,8 +325,8 @@ impl<Block, F, B, E, RA> StateBackend<B, E, Block, RA> for LightState<Block, F,
keys: Option<Vec<StorageKey>>
) {
let keys = match keys {
Some(keys) => keys,
None => {
Some(keys) if !keys.is_empty() => keys,
_ => {
warn!("Cannot subscribe to all keys on light client. Subscription rejected.");
return;
}