Commit a83d117
committed
graph/db: fix race in DisconnectBlockAtHeight cache access
The DisconnectBlockAtHeight method was modifying the rejectCache and
chanCache without holding the cacheMu lock. This caused races with
other operations that properly held the lock, such as AddChannelEdge
which modifies the caches in its OnCommit callback while the batch
scheduler holds cacheMu.
Fix by acquiring cacheMu before removing channels from the caches.1 parent 550de8d commit a83d117
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2916 | 2916 | | |
2917 | 2917 | | |
2918 | 2918 | | |
| 2919 | + | |
2919 | 2920 | | |
2920 | 2921 | | |
2921 | 2922 | | |
2922 | 2923 | | |
| 2924 | + | |
2923 | 2925 | | |
2924 | 2926 | | |
2925 | 2927 | | |
| |||
0 commit comments