Skip to content

Commit

Permalink
Fix datarace (#14157)
Browse files Browse the repository at this point in the history
* Fix datarace

* Add changeset
  • Loading branch information
dimriou authored Aug 21, 2024
1 parent b388712 commit 1852353
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-eels-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Fix bhe datarace #internal
2 changes: 2 additions & 0 deletions core/chains/evm/gas/block_history_estimator.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ func (b *BlockHistoryEstimator) setMaxPercentileGasPrice(gasPrice *assets.Wei) {
}

func (b *BlockHistoryEstimator) getBlockHistoryNumbers() (numsInHistory []int64) {
b.blocksMu.RLock()
defer b.blocksMu.RUnlock()
for _, b := range b.blocks {
numsInHistory = append(numsInHistory, b.Number)
}
Expand Down

0 comments on commit 1852353

Please sign in to comment.