Commit d1e4265
committed
Merge bitcoin/bitcoin#25543: wallet: cleanup cached amount and input mine check code
47ea70f wallet: clean AllInputsMine code, use InputIsMine internally (furszy)
bf310b0 wallet: clean InputIsMine code, use GetWalletTx (furszy)
0cb1772 wallet: unify CachedTxGetImmatureCredit and CachedTxGetImmatureWatchOnlyCredit (furszy)
04c6423 wallet: remove always true 'fUseCache' arg from CachedTxGetAvailableCredit (furszy)
4f0ca9b wallet: remove always false 'recalculate' arg from GetCachableAmount (furszy)
47b1012 wallet: remove always true 'fUseCache' from CachedTxGetImmatureWatchOnlyCredit (furszy)
da8f62d wallet: remove always true 'fUseCache' from CachedTxGetImmatureCredit (furszy)
Pull request description:
Another wallet's code garbage collector work. Part of the `mapWallet` encapsulation goal.
Focused on the following points:
1) Remove always true `fUseCache` argument from `CachedTxGetImmatureCredit`, `CachedTxGetImmatureWatchOnly` and `CachedTxGetAvailableCredit`.
2) Remove always false `recalculate` argument from `GetCachableAmount`.
3) Merge `CachedTxGetImmatureCredit` and `CachedTxGetImmatureWatchOnlyCredit` as they do share the exact same code.
4) Clean `InputIsMine` method; use `GetWalletTx` instead of access the wallet's map directly.
5) Clean `AllInputsMine` method; use `InputIsMine` instead of duplicate the exact same code internally.
ACKs for top commit:
aureleoules:
re-ACK 47ea70f
achow101:
ACK 47ea70f
theStack:
re-ACK 47ea70f
Tree-SHA512: e9b64b57de7be6165c5e5552e28cd8a03d4736b0a3707d29d129e3a0a3db6a855c2abf47a24917236060835a297b564a97b66d4c8b178d6bdafb93a12a7c0b403 files changed
+20
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 25 | + | |
| 26 | + | |
42 | 27 | | |
43 | 28 | | |
44 | 29 | | |
| |||
111 | 96 | | |
112 | 97 | | |
113 | 98 | | |
114 | | - | |
| 99 | + | |
115 | 100 | | |
116 | 101 | | |
117 | | - | |
| 102 | + | |
118 | 103 | | |
119 | 104 | | |
120 | 105 | | |
| |||
160 | 145 | | |
161 | 146 | | |
162 | 147 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 148 | + | |
175 | 149 | | |
176 | 150 | | |
177 | 151 | | |
178 | 152 | | |
179 | | - | |
| 153 | + | |
180 | 154 | | |
181 | 155 | | |
182 | 156 | | |
183 | 157 | | |
184 | 158 | | |
185 | | - | |
| 159 | + | |
186 | 160 | | |
187 | 161 | | |
188 | 162 | | |
| |||
193 | 167 | | |
194 | 168 | | |
195 | 169 | | |
196 | | - | |
| 170 | + | |
197 | 171 | | |
198 | 172 | | |
199 | 173 | | |
| |||
328 | 302 | | |
329 | 303 | | |
330 | 304 | | |
331 | | - | |
332 | | - | |
| 305 | + | |
| 306 | + | |
333 | 307 | | |
334 | 308 | | |
335 | 309 | | |
| |||
338 | 312 | | |
339 | 313 | | |
340 | 314 | | |
341 | | - | |
342 | | - | |
| 315 | + | |
| 316 | + | |
343 | 317 | | |
344 | 318 | | |
345 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| |||
0 commit comments