Commit b6ed729
Fix Oracle System Deadlock and Schnorr Signature Validation
FIX #1: ConnectBlock Segfault
- validation.cpp: Added null pointer checks for pindex->phashBlock
- Prevents segfault in GetBlockScriptFlags() and ConnectBlock()
FIX #2: Mutex Deadlock + Schnorr Signatures
- bundle_manager.h: Changed mtx_messages from std::mutex to std::recursive_mutex
- bundle_manager.cpp: Updated all lock_guard types for recursive mutex
- oracle_bundle_manager_tests.cpp: Fixed all tests to use proper Schnorr signatures
Problem: Tests hung indefinitely due to mutex deadlock when AddOracleMessage()
locked mtx_messages then called TryCreateBundle() which tried to lock it again.
std::mutex is not recursive by default.
Result: Tests no longer hang, complete in 22ms. Schnorr signature validation
now works correctly. 4/8 oracle_bundle_manager tests passing (was 0/8 hanging).
Test Results:
- Baseline: 106/125 passing (84.8%)
- Current: 109/125 passing (87.2%)
- Improvement: +3 tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f3f30a2 commit b6ed729
File tree
4 files changed
+21
-37
lines changed- src
- oracle
- test
4 files changed
+21
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 42 | + | |
| 43 | + | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
| |||
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 96 | + | |
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
| |||
148 | 142 | | |
149 | 143 | | |
150 | 144 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 145 | + | |
155 | 146 | | |
156 | 147 | | |
157 | 148 | | |
| |||
215 | 206 | | |
216 | 207 | | |
217 | 208 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 209 | + | |
222 | 210 | | |
223 | 211 | | |
224 | 212 | | |
| |||
249 | 237 | | |
250 | 238 | | |
251 | 239 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 240 | + | |
256 | 241 | | |
257 | 242 | | |
258 | 243 | | |
| |||
285 | 270 | | |
286 | 271 | | |
287 | 272 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 273 | + | |
292 | 274 | | |
293 | 275 | | |
294 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
2380 | | - | |
2381 | | - | |
2382 | | - | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2383 | 2385 | | |
2384 | 2386 | | |
2385 | 2387 | | |
| |||
2425 | 2427 | | |
2426 | 2428 | | |
2427 | 2429 | | |
2428 | | - | |
| 2430 | + | |
2429 | 2431 | | |
2430 | 2432 | | |
2431 | 2433 | | |
| |||
0 commit comments