Add lock to make sure slot-based locktree calls are safe (#7993)

This commit is contained in:
carllin
2020-01-28 13:45:41 -08:00
committed by GitHub
parent 1596c961d9
commit 4ffd7693d6
6 changed files with 79 additions and 27 deletions

View File

@ -383,7 +383,11 @@ impl JsonRpcRequestProcessor {
let stakes = HashMap::new();
let stakes = bank.epoch_vote_accounts(epoch).unwrap_or(&stakes);
Ok(self.blockstore.get_block_time(slot, slot_duration, stakes))
Ok(self
.blockstore
.get_block_time(slot, slot_duration, stakes)
.ok()
.unwrap_or(None))
}
}