Commit c9017ce
protect g_chainman with cs_main
I'd previously attempted to create a specialized lock for ChainstateManager,
but it turns out that because that lock would be required for functions like
ChainActive() and ChainstateActive(), it created irreconcilable lock inversions
since those functions are used so broadly throughout the codebase.
Instead, I'm just using cs_main to protect the contents of g_chainman.
Co-authored-by: Russell Yanofsky <[email protected]>1 parent 2b081c4 commit c9017ce
File tree
5 files changed
+48
-11
lines changed- src
- qt/test
- wallet/test
5 files changed
+48
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
717 | 723 | | |
718 | 724 | | |
719 | 725 | | |
| |||
1622 | 1628 | | |
1623 | 1629 | | |
1624 | 1630 | | |
1625 | | - | |
1626 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1627 | 1634 | | |
1628 | 1635 | | |
1629 | 1636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
1295 | 1297 | | |
1296 | 1298 | | |
1297 | 1299 | | |
| 1300 | + | |
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
| |||
4704 | 4707 | | |
4705 | 4708 | | |
4706 | 4709 | | |
4707 | | - | |
| 4710 | + | |
4708 | 4711 | | |
4709 | 4712 | | |
4710 | 4713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
826 | 835 | | |
827 | 836 | | |
828 | 837 | | |
829 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
830 | 848 | | |
831 | 849 | | |
832 | 850 | | |
833 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
834 | 861 | | |
835 | 862 | | |
836 | 863 | | |
| |||
894 | 921 | | |
895 | 922 | | |
896 | 923 | | |
897 | | - | |
| 924 | + | |
898 | 925 | | |
899 | 926 | | |
900 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
0 commit comments