Do not hold lock unnecessarily when hashing (#24815)
This commit is contained in:
parent
a61652104b
commit
a73f99823d
|
@ -6203,12 +6203,12 @@ impl Bank {
|
||||||
self.last_blockhash().as_ref(),
|
self.last_blockhash().as_ref(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if let Some(buf) = self
|
let buf = self
|
||||||
.hard_forks
|
.hard_forks
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get_hash_data(self.slot(), self.parent_slot())
|
.get_hash_data(self.slot(), self.parent_slot());
|
||||||
{
|
if let Some(buf) = buf {
|
||||||
info!("hard fork at bank {}", self.slot());
|
info!("hard fork at bank {}", self.slot());
|
||||||
hash = extend_and_hash(&hash, &buf)
|
hash = extend_and_hash(&hash, &buf)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue