Clean up
This commit is contained in:
parent
23c76caafa
commit
3632a98062
@ -366,9 +366,8 @@ impl HeaderChain {
|
|||||||
pub fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
pub fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||||
let load_from_db = |hash: H256| {
|
let load_from_db = |hash: H256| {
|
||||||
let mut cache = self.cache.lock();
|
let mut cache = self.cache.lock();
|
||||||
let header = cache.block_header(&hash);
|
|
||||||
|
|
||||||
match header {
|
match cache.block_header(&hash) {
|
||||||
Some(header) => Some(header),
|
Some(header) => Some(header),
|
||||||
None => {
|
None => {
|
||||||
match self.db.get(self.col, &hash) {
|
match self.db.get(self.col, &hash) {
|
||||||
|
Loading…
Reference in New Issue
Block a user