Commit 2f6dca4
committed
Merge bitcoin#30335: Mining interface followups, reduce cs_main locking, test rpc bug fix
a74b0f9 Have testBlockValidity hold cs_main instead of caller (Sjors Provoost)
f6dc6db refactor: use CHECK_NONFATAL to avoid single-use symbol (Sjors Provoost)
5fb2b70 Drop unneeded lock from createNewBlock (Sjors Provoost)
75ce763 refactor: testBlockValidity make out argument last (Sjors Provoost)
83a9bef Add missing include for mining interface (Sjors Provoost)
Pull request description:
Followups from bitcoin#30200
Fixes:
- `std::unique_ptr` needs `#include <memory>` (noticed while working on bitcoin#30332, which has fewer includes than its parent PR that I originally tested with)
- Drop lock from createNewBlock that was spuriously added
- Have testBlockValidity hold cs_main instead of caller (also fixes a race condition in test-only code)
Refactor:
- Use CHECK_NONFATAL to avoid single-use symbol (refactor)
- move output argument `state` to the end of `testBlockValidity`, see bitcoin#30200 (comment)
ACKs for top commit:
AngusP:
Code Review ACK a74b0f9
itornaza:
Tested ACK a74b0f9
ryanofsky:
Code review ACK a74b0f9. Just new error string is added since last review, and a commit message was updated
Tree-SHA512: 805e133bb59303fcee107d6f02b3e2761396c290efb731a85e6a29ae56b4b1b9cd28ada9629e979704dcfd98cf35034e7e6b618e29923049eb1eca2f65630e413 files changed
+18
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | | - | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
874 | 874 | | |
875 | | - | |
876 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
877 | 884 | | |
878 | 885 | | |
879 | 886 | | |
880 | 887 | | |
881 | 888 | | |
882 | 889 | | |
883 | 890 | | |
884 | | - | |
885 | 891 | | |
886 | 892 | | |
887 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
| |||
387 | 385 | | |
388 | 386 | | |
389 | 387 | | |
390 | | - | |
391 | | - | |
392 | 388 | | |
393 | | - | |
| 389 | + | |
394 | 390 | | |
395 | 391 | | |
396 | 392 | | |
| |||
667 | 663 | | |
668 | 664 | | |
669 | 665 | | |
670 | | - | |
671 | | - | |
672 | | - | |
| 666 | + | |
673 | 667 | | |
674 | 668 | | |
675 | 669 | | |
| |||
713 | 707 | | |
714 | 708 | | |
715 | 709 | | |
716 | | - | |
| 710 | + | |
717 | 711 | | |
718 | 712 | | |
719 | 713 | | |
| |||
0 commit comments