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

automerge
This commit is contained in:
mergify[bot]
2020-01-28 14:57:37 -08:00
committed by GitHub
parent 4e6eca9748
commit 756e6334b0
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))
}
}