Commit 9d3e39c
committed
Log block header in net_processing
Previously ChainstateManager::AcceptBlockHeader would log when it
saw a new header. This commit moves logging to the call site(s) in
net_processing. The next commits will then log which peer sent it
and whether it was part of a compact block.
This commit changes behavior:
- when multiple headers are received in a single message, only the
last one is logged
- if any of the headers are invalid, the valid ones are not logged
This happens because net_processing calls ProcessNewBlockHeaders
with multiple headers, which then calls AcceptBlockHeader one
header at a time.
Additionally:
- when the header is received via a compact block, there's no more
duplicate log (a later commit also unifies logging code paths)1 parent cdc3299 commit 9d3e39c
3 files changed
+34
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
1074 | 1076 | | |
1075 | 1077 | | |
1076 | 1078 | | |
| |||
2970 | 2972 | | |
2971 | 2973 | | |
2972 | 2974 | | |
2973 | | - | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
2974 | 2979 | | |
2975 | 2980 | | |
2976 | 2981 | | |
2977 | 2982 | | |
2978 | 2983 | | |
2979 | 2984 | | |
2980 | 2985 | | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
2981 | 2990 | | |
2982 | 2991 | | |
2983 | 2992 | | |
| |||
3405 | 3414 | | |
3406 | 3415 | | |
3407 | 3416 | | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
3408 | 3440 | | |
3409 | 3441 | | |
3410 | 3442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4403 | 4403 | | |
4404 | 4404 | | |
4405 | 4405 | | |
4406 | | - | |
4407 | | - | |
4408 | | - | |
4409 | | - | |
4410 | | - | |
4411 | | - | |
4412 | | - | |
4413 | | - | |
4414 | | - | |
4415 | | - | |
4416 | | - | |
4417 | | - | |
4418 | | - | |
4419 | | - | |
4420 | | - | |
4421 | | - | |
4422 | | - | |
4423 | 4406 | | |
4424 | 4407 | | |
4425 | 4408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
1221 | 1222 | | |
1222 | 1223 | | |
1223 | 1224 | | |
| |||
0 commit comments