Commit fde815f
authored
Changes the semantics of election::confirmed to return if the block is durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk. (nanocurrency#4200)
Changes the semantics of election::confirmed to return if the block is durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk.
Modifies tests:
active_transactions.dropped_cleanup
active_transactions.inactive_votes_cache_election_start
active_transactions.republish_winner
confirmation_height.conflict_rollback_cemented
election.quorum_minimum_confirm_success
election.quorum_minimum_update_weight_before_quorum_checks
node.rollback_gap_source
rpc.confirmation_active
vote_processor.invalid_signature
Rewriting test to use a block that is not confirmed on disk.
Cleaning up confirmation_height.conflict_rollback_cemented and reduce complexity.
Cleaning up election.quorum_minimum_confirm_success and fixing race condition where confirmation happens asynchronously.
Fixing race condition in election.quorum_minimum_update_weight_before_quorum_checks when checking asynchronous election confirmation.
Cleaning up and simplifying node.rollback_gap_source
Removing some test calls to block_processor::flush which is being phased out.1 parent c288bb1 commit fde815f
9 files changed
Lines changed: 105 additions & 162 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 516 | + | |
520 | 517 | | |
521 | 518 | | |
522 | 519 | | |
523 | 520 | | |
524 | | - | |
525 | 521 | | |
526 | 522 | | |
527 | 523 | | |
| |||
622 | 618 | | |
623 | 619 | | |
624 | 620 | | |
| 621 | + | |
| 622 | + | |
625 | 623 | | |
626 | 624 | | |
627 | 625 | | |
628 | 626 | | |
629 | 627 | | |
630 | | - | |
| 628 | + | |
631 | 629 | | |
632 | 630 | | |
633 | 631 | | |
634 | 632 | | |
635 | | - | |
| 633 | + | |
636 | 634 | | |
637 | 635 | | |
638 | 636 | | |
639 | 637 | | |
640 | | - | |
| 638 | + | |
641 | 639 | | |
642 | 640 | | |
643 | 641 | | |
644 | | - | |
| 642 | + | |
645 | 643 | | |
646 | 644 | | |
647 | 645 | | |
| |||
650 | 648 | | |
651 | 649 | | |
652 | 650 | | |
653 | | - | |
| 651 | + | |
654 | 652 | | |
655 | 653 | | |
656 | 654 | | |
657 | 655 | | |
658 | | - | |
| 656 | + | |
659 | 657 | | |
660 | 658 | | |
661 | | - | |
662 | | - | |
| 659 | + | |
| 660 | + | |
663 | 661 | | |
664 | 662 | | |
665 | 663 | | |
| |||
668 | 666 | | |
669 | 667 | | |
670 | 668 | | |
671 | | - | |
| 669 | + | |
672 | 670 | | |
673 | 671 | | |
674 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
| 1095 | + | |
| 1096 | + | |
1098 | 1097 | | |
1099 | 1098 | | |
1100 | 1099 | | |
1101 | 1100 | | |
1102 | | - | |
| 1101 | + | |
1103 | 1102 | | |
1104 | 1103 | | |
1105 | | - | |
1106 | | - | |
| 1104 | + | |
| 1105 | + | |
1107 | 1106 | | |
1108 | | - | |
1109 | | - | |
1110 | 1107 | | |
1111 | | - | |
1112 | 1108 | | |
| 1109 | + | |
1113 | 1110 | | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1125 | 1123 | | |
1126 | 1124 | | |
1127 | 1125 | | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1167 | 1135 | | |
| 1136 | + | |
1168 | 1137 | | |
1169 | 1138 | | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1187 | 1142 | | |
1188 | 1143 | | |
1189 | 1144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
131 | | - | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
141 | | - | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
157 | 158 | | |
158 | | - | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
211 | | - | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | | - | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
0 commit comments