Commit 37b765b
MarcoFalke
Merge #19102: wallet: Introduce and use DummyDatabase instead of dummy BerkeleyDatabase
0fcff54 walletdb: Ensure that having no database handle is a failure (Andrew Chow)
da039d2 Remove BDB dummy databases (Andrew Chow)
0103d64 Introduce DummyDatabase and use it in the tests (Andrew Chow)
Pull request description:
In the unit tests, we use a dummy `WalletDatabase` which does nothing and always returns true. This is currently implemented by creating a `BerkeleyDatabase` in dummy mode. This PR instead adds a `DummyDatabase` class which does nothing and never fails for use in the tests. `CreateDummyWalletDatabase` is changed to return this `DummyDatabase` and `BerkeleyDatabase` is cleaned up to remove all of the checks for `IsDummy`.
Based on `WalletDatabase` abstract class introduced in #19334
ACKs for top commit:
instagibbs:
utACK bitcoin/bitcoin@0fcff54
MarcoFalke:
crACK 0fcff54 🚈
Tree-SHA512: 05fbf32e078753e9a55a05f4c080b6d365b909a2a3a8e571b7e64b59ebbe53da49394f70419cc793192ade79f312f5e0422ca7c261ba81bae5912671c5ff64024 files changed
+47
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | 340 | | |
345 | 341 | | |
346 | 342 | | |
| |||
472 | 468 | | |
473 | 469 | | |
474 | 470 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | 471 | | |
479 | 472 | | |
480 | 473 | | |
| |||
602 | 595 | | |
603 | 596 | | |
604 | 597 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | 598 | | |
609 | 599 | | |
610 | 600 | | |
| |||
632 | 622 | | |
633 | 623 | | |
634 | 624 | | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | 625 | | |
639 | 626 | | |
640 | 627 | | |
| |||
672 | 659 | | |
673 | 660 | | |
674 | 661 | | |
675 | | - | |
676 | | - | |
677 | | - | |
| 662 | + | |
678 | 663 | | |
679 | 664 | | |
680 | 665 | | |
681 | 666 | | |
682 | | - | |
683 | | - | |
684 | | - | |
| 667 | + | |
685 | 668 | | |
686 | 669 | | |
687 | 670 | | |
688 | 671 | | |
689 | | - | |
690 | | - | |
691 | | - | |
| 672 | + | |
692 | 673 | | |
693 | 674 | | |
694 | 675 | | |
| |||
786 | 767 | | |
787 | 768 | | |
788 | 769 | | |
789 | | - | |
| 770 | + | |
790 | 771 | | |
791 | 772 | | |
792 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| |||
166 | 163 | | |
167 | 164 | | |
168 | 165 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 166 | | |
178 | 167 | | |
179 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
157 | 198 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| |||
0 commit comments