Commit 2a07c46
committed
Merge bitcoin#29757: feefrac: avoid explicitly computing diagram; compare based on chunks
b22901d Avoid explicitly computing diagram; compare based on chunks (Pieter Wuille)
Pull request description:
This merges the `BuildDiagramFromChunks` and `CompareFeeRateDiagram` introduced in bitcoin#29242 into a single `CompareChunks` function, which operates on sorted chunk data rather than diagrams, instead computing the diagram on the fly.
This avoids the need for the construction of an intermediary diagram object, and removes the slightly arbitrary "all diagrams must start at (0, 0)" requirement.
Not a big deal, but I think the result is a bit cleaner and not really more complicated.
ACKs for top commit:
glozow:
reACK b22901d
instagibbs:
reACK bitcoin@b22901d
Tree-SHA512: ca37bdf61d9a9cb5435f4da73e97ead33bf65828ad9af49b87336b1ece70db8ced1c21f517fc6eb6d616311c91f3da75ecae6b9bd42547133e3a3c5320b7816dFile tree
9 files changed
+140
-190
lines changed- src
- policy
- test
- fuzz
- util
9 files changed
+140
-190
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | | - | |
197 | | - | |
| 196 | + | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 85 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
19 | 33 | | |
20 | 34 | | |
21 | 35 | | |
| |||
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
106 | | - | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 85 | | |
97 | 86 | | |
98 | 87 | | |
| |||
107 | 96 | | |
108 | 97 | | |
109 | 98 | | |
110 | | - | |
| 99 | + | |
111 | 100 | | |
112 | 101 | | |
113 | 102 | | |
| |||
167 | 156 | | |
168 | 157 | | |
169 | 158 | | |
170 | | - | |
| 159 | + | |
171 | 160 | | |
172 | | - | |
| 161 | + | |
173 | 162 | | |
174 | 163 | | |
175 | | - | |
| 164 | + | |
176 | 165 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
185 | 177 | | |
186 | | - | |
187 | | - | |
| 178 | + | |
188 | 179 | | |
189 | | - | |
190 | | - | |
| 180 | + | |
| 181 | + | |
191 | 182 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
196 | 186 | | |
197 | 187 | | |
198 | 188 | | |
| |||
201 | 191 | | |
202 | 192 | | |
203 | 193 | | |
| 194 | + | |
| 195 | + | |
204 | 196 | | |
205 | 197 | | |
206 | | - | |
207 | | - | |
| 198 | + | |
| 199 | + | |
208 | 200 | | |
209 | 201 | | |
210 | 202 | | |
| |||
0 commit comments