Commit 7c3a8d4
committed
proof: return copy of mock proof
This fixes a unit test race condition where two goroutines would be
operating on the same proof because they both received the same
reference from the mock. This would not happen in production as the
proof archive always creates a new proof object.
So we fix the race by also creating a unique copy of the mocked proof
whenever it is requested.1 parent e3144a9 commit 7c3a8d4
1 file changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
272 | 294 | | |
273 | 295 | | |
274 | 296 | | |
| |||
0 commit comments