Skip to content

Commit

Permalink
small optim
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon committed Aug 6, 2024
1 parent 2b1cacc commit 517cae6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions massa-execution-worker/src/speculative_async_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,6 @@ impl SpeculativeAsyncPool {

match key {
Some(key) => {
let final_val = self
.final_state
.read()
.get_ledger()
.get_data_entry(&addr, &key);
let activ_val = self
.active_history
.read()
Expand All @@ -337,7 +332,11 @@ impl SpeculativeAsyncPool {
let latest_val = match activ_val {
HistorySearchResult::Present(val) => Some(val),
HistorySearchResult::Absent => None,
HistorySearchResult::NoInfo => final_val,
HistorySearchResult::NoInfo => self
.final_state
.read()
.get_ledger()
.get_data_entry(&addr, &key),
};

ledger_changes.has_changes(&addr, Some(key), latest_val)
Expand Down

0 comments on commit 517cae6

Please sign in to comment.