Commit a8e6ab7
committed
bcf0c3d bitcoin: Add a test for matching on network (Tobin C. Harding)
1e69e63 Remove non_exhausive from Network (Tobin C. Harding)
Pull request description:
Note that Kix is AWOL at the moment so we will need to let this sit for a good while so he gets a chance to see it since he is central to the debate in rust-bitcoin#2225.
Issue rust-bitcoin#2225 is long and has many valid opposing opinions. The main argument for having non_exhaustive is that it helps future proof the ecosystem at the cost of pain now. The main argument against having non_exhaustive is why have pain now when adding a network is so rare that having pain then is ok.
At the end of the thread Andrew posts:
> I continue to think we should have an exhaustive enum, with a bunch of
> documentation about how to use it properly. I am warming up to the
> "don't have an enum, just have rules for defining your own" but I think
> this would be needless work for people who just want to grab an
> off-the-shelf set of networks or people who want to make their own enum
> but want to see an example of how to do it first.
In order to make some forward progress lets remove the `non_exhaustive` now and backport this change to 0.32, 0.31, an 0.30.
Later we can add, and release in 0.33, whatever forward protection / libapocalyse protection we want to add.
This removes the pain now and gives us a path to prevent future pain - that should keep all parties happy.
ACKs for top commit:
apoelstra:
ACK bcf0c3d; successfully ran local tests
luisschwab:
ACK bcf0c3d
Tree-SHA512: d8c24e8d2320b289aafdfa4b03a96407f40dd120dfcbd55973c35f62cd8f74eff8e0d961a7bb31ae7fa9dc4f6e68949c225bdbacbc1733042679c4913a2231b1
2 files changed
+84
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | | - | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 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 | + | |
0 commit comments