Commit 22cf7f9
committed
Fix data race in lookup_confirmations()
Hold the `HeaderList` read lock during lookups to ensure results are
computed against a stable chain tip. Previously, another thread could
update the `HeaderList` between reading the height and querying the DB,
resulting in inconsistent results.
Also adds a missing timer.
(to be squashed)1 parent 416cb4c commit 22cf7f9
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | | - | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1073 | 1075 | | |
1074 | 1076 | | |
1075 | 1077 | | |
| |||
0 commit comments