Commit 6c13b13
committed
Merge bitcoin/bitcoin#29421: net: make the list of known message types a compile time constant
b3efb48 protocol: make message types constexpr (Vasil Dimov)
2fa9de0 net: make the list of known message types a compile time constant (Vasil Dimov)
Pull request description:
Turn the `std::vector` to `std::array` because it is cheaper and allows us to have the number of the messages as a compile time constant: `ALL_NET_MESSAGE_TYPES.size()` which can be used in future code to build other `std::array`s with that size.
---
This change is part of bitcoin/bitcoin#29418 but it makes sense on its own and would be good to have it, regardless of the fate of bitcoin/bitcoin#29418. Also, if this is merged, that would reduce the size of bitcoin/bitcoin#29418, thus the current standalone PR.
ACKs for top commit:
achow101:
ACK b3efb48
jonatack:
ACK b3efb48
maflcko:
utACK b3efb48 🎊
willcl-ark:
ACK b3efb48
Tree-SHA512: 6d3860c138c64514ebab13d97ea67893e2d346dfac30a48c3d9bc769a1970407375ea4170afdb522411ced306a14a9af4eede99e964d1fb1ea3efff5d5eb57afFile tree
6 files changed
+80
-131
lines changed- src
- test/fuzz
- test/fuzz
6 files changed
+80
-131
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3736 | 3736 | | |
3737 | 3737 | | |
3738 | 3738 | | |
3739 | | - | |
| 3739 | + | |
3740 | 3740 | | |
| 3741 | + | |
3741 | 3742 | | |
3742 | 3743 | | |
3743 | 3744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 10 | | |
92 | 11 | | |
93 | 12 | | |
| |||
164 | 83 | | |
165 | 84 | | |
166 | 85 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 86 | | |
173 | 87 | | |
174 | 88 | | |
| |||
0 commit comments