Commit Graph

4951 Commits

Author SHA1 Message Date
merge-script 299754c2c2
Merge rust-bitcoin/rust-bitcoin#3460: Add tests for block version
0e0192c025 Add tests for block version (Shing Him Ng)

Pull request description:

  Add unit tests for block `Version`

ACKs for top commit:
  tcharding:
    ACK 0e0192c025
  apoelstra:
    ACK 0e0192c025 successfully ran local tests

Tree-SHA512: 15b9d69d44335f6b2c75a9a8950588915247e3b1108624f8d797e5d8b6037e9e927bab97dba8283021da5d223b84e6b9cf94c34eb5204c5da060f42590634833
2024-10-14 14:04:55 +00:00
Shing Him Ng 0e0192c025 Add tests for block version 2024-10-13 22:07:31 -05:00
merge-script 1b23d1c66c
Merge rust-bitcoin/rust-bitcoin#3431: Move script types to `primitives`
d649c06238 Move script types to primitives (Tobin C. Harding)
ec4635904b Inline bytes_to_asm_fmt into Script::Display impl (Tobin C. Harding)

Pull request description:

  First patch removes `bytes_to_asm_fmt` as requested by Kix here: https://github.com/rust-bitcoin/rust-bitcoin/pull/3194#discussion_r1756557768

  Second patch does the move. The move is minimal but there is quite a bit of code moved in `script/mod.rs` - I believe it is as minimal as required as well.

ACKs for top commit:
  apoelstra:
    ACK d649c06238 successfully ran local tests

Tree-SHA512: 329a23948ac5617402a724b734d81cde8ab1f57ddd4860f858880618e260ea8b5cc89315de1fd93ae32787d5e8508fd604a41f003b1f5772a773b5b1648d382c
2024-10-14 00:31:38 +00:00
Tobin C. Harding d649c06238
Move script types to primitives
Move the `Script` and `ScriptBuf` types to `primitives`, nothing else.
2024-10-14 09:02:39 +11:00
Tobin C. Harding ec4635904b
Inline bytes_to_asm_fmt into Script::Display impl
This function does not need to exist anymore because it is exactly the
same as what is produced by the `Display` impl.
2024-10-14 09:02:26 +11:00
merge-script 48b2975870
Merge rust-bitcoin/rust-bitcoin#3456: feat: add sign fn for sign_message
c41a6e9b1b feat: add sign fn for sign_message (ChrisCho-H)

Pull request description:

  While it's not hard to create the signature using `secp256k1` modules with `signed_msg_hash`, it's much more convenient and safe to provide one-way function to generate signed signature(even without the understanding about the semantics of bitcoin message signing).

ACKs for top commit:
  apoelstra:
    ACK c41a6e9b1b successfully ran local tests
  tcharding:
    ACK c41a6e9b1b

Tree-SHA512: 84caea275059381040c71100badb54556dd105722f79ac43d2df7eb0e5428cf8e7acc2d7f262625dd008837099a928c3c8be858f9ab11838c2eec1786e9f1844
2024-10-13 21:13:39 +00:00
merge-script cc5b46bfc7
Merge rust-bitcoin/rust-bitcoin#3462: Automated nightly rustfmt (2024-10-13)
f1733309e0 2024-10-13 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  apoelstra:
    ACK f1733309e0 successfully ran local tests

Tree-SHA512: 465336b92d9b8a61afbc8e8d0560f3b41a732e3245d764447cc2a5429f693e29172bebeca756a91b5a1f3a16d42728960a526111bbd92316f72b46b420373641
2024-10-13 16:40:17 +00:00
merge-script 7a5816ce0b
Merge rust-bitcoin/rust-bitcoin#3461: Remove unused import
8f79a0560e Remove unused import (yancy)

Pull request description:

  Ran `./maintainer-tools/ci/run_task.sh stable` without error locally, so I don't think this import is needed.

ACKs for top commit:
  tcharding:
    ACK 8f79a0560e
  apoelstra:
    ACK 8f79a0560e successfully ran local tests

Tree-SHA512: 255b97066eb8b75bf33a0846ecda739695441273ff98703516b46983a9fe5c76e76c79ab2548bd64fd654dd8659ea5392b8079142b447e67a6a31d75883aa8d1
2024-10-13 15:24:27 +00:00
merge-script 4717f4d1af
Merge rust-bitcoin/rust-bitcoin#3459: feat: replace ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF
3565f70df9 feat: replace ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF (ChrisCho-H)

Pull request description:

  follow up https://github.com/rust-bitcoin/rust-bitcoin/pull/3455.
  Replace all `ENABLE_RBF_NO_LOCKTIME`(deprecated) with `ENABLE_LOCKTIME_AND_RBF`

ACKs for top commit:
  apoelstra:
    ACK 3565f70df9 successfully ran local tests
  tcharding:
    ACK 3565f70df9

Tree-SHA512: 4c6c6ad9ac89efe042cf239ce68594e715dbc827c1ae430819e2f16d2191f82d81f1e55b348f8176fc21454cf9d25fc9da1a414982cd3483d5f9f39834441f6c
2024-10-13 14:09:42 +00:00
Fmt Bot f1733309e0 2024-10-13 automated rustfmt nightly 2024-10-13 01:20:28 +00:00
yancy 8f79a0560e Remove unused import 2024-10-12 19:20:11 -05:00
merge-script 65e290a0ce
Merge rust-bitcoin/rust-bitcoin#3450: Add version three variant to transaction version
9e6b8faf84 feat: add version three variant to transaction version (Rob N)

Pull request description:

  Topologically restricted transactions are now considered standard as of Bitcoin 28.0.

ACKs for top commit:
  apoelstra:
    ACK 9e6b8faf84 successfully ran local tests
  tcharding:
    ACK 9e6b8faf84

Tree-SHA512: 289b986304e206802f04cee6607087167f6d91d8a81d4fc49ed01c430f4f6ad00b44646fbefdd000148fc5bfe2d257f92b386bfaf4405c482e4e438d830ab586
2024-10-12 17:55:21 +00:00
merge-script ae2358610d
Merge rust-bitcoin/rust-bitcoin#3457: Fix unused import
a250c8eee4 Fix unused imports (Shing Him Ng)

Pull request description:

  Found some unused imports while working on something unrelated

ACKs for top commit:
  apoelstra:
    ACK a250c8eee4 successfully ran local tests
  tcharding:
    ACK a250c8eee4

Tree-SHA512: ffa4fcddb91c849df7885a6d734405ab704e0353293fa3462a981e179ea49091990df4482eee2324e7b5ef250a0890b2e8983d53ec288ca6e8ada77e30c102dc
2024-10-12 14:56:48 +00:00
Andrew Poelstra 76f022d380 Merge rust-bitcoin/rust-bitcoin#3438: Implement Arbitrary for Block
0c824c9c68 Implement Arbitrary for Block (Shing Him Ng)

Pull request description:

  Implementing `Arbitrary` for `Block` and its child types

ACKs for top commit:
  apoelstra:
    ACK 0c824c9c68 successfully ran local tests
  tcharding:
    ACK 0c824c9c68

Tree-SHA512: 407acd4155ca7496bf7c59af19f103b22b4c74dd013c2e2c42aae690ba7264ecd42ed034355cf8895f2532f8cef77dfdbeac250301a6973afd5f3920be7e4310
2024-10-12 14:15:28 +00:00
ChrisCho-H 3565f70df9 feat: replace ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF 2024-10-12 12:42:43 +09:00
ChrisCho-H c41a6e9b1b feat: add sign fn for sign_message 2024-10-12 12:37:04 +09:00
Rob N 9e6b8faf84
feat: add version three variant to transaction version 2024-10-11 06:38:58 -10:00
merge-script 0f887707ea
Merge rust-bitcoin/rust-bitcoin#3455: Use new Sequence::ENABLE_RBF_AND_LOCKTIME
5e0a07e74f Use new Sequence::ENABLE_RBF_AND_LOCKTIME (Tobin C. Harding)

Pull request description:

  We just renamed this and forgot to use the new name. This should have been caught by CI.

ACKs for top commit:
  apoelstra:
    ACK 5e0a07e74f successfully ran local tests

Tree-SHA512: 0830184f3afa7b42d53460444637d16bace98438fac14a53e3c6f2fdb5b801847f3864d104be2e5311131b2db432e7ef8dd20ad833420ea05303fc93bd4dc68c
2024-10-11 14:59:57 +00:00
merge-script 03715872cd
Merge rust-bitcoin/rust-bitcoin#3432: fmt: Use style_edition = 2021
323e706113 Add rustfmt config option style_edition (Tobin C. Harding)
2e4179ed0f Run the formatter (Tobin C. Harding)
2c40b4f4ec Configure formmater to skip read_compact_size (Tobin C. Harding)

Pull request description:

  `rustfmt` is emitting:

   Warning: the `version` option is deprecated. Use `style_edition` instead.

  As suggested add a config option and set it to 2021.

  - Patch 1: Manually configure rustfmt to skip some code
  - Patch 2: Run the formmater with current configuration
  - Patch 3: Add the new config option (remove old one), introduces no new formatting requirements

ACKs for top commit:
  apoelstra:
    ACK 323e706113 successfully ran local tests

Tree-SHA512: 7f80cc89f86d2d50936e51704344955fa00532424c29c0ee3fae1a6836e24030f909b770d28da13e1c5efde3d49ad7d52c6d909d120fb09c33abf1755f62cd38
2024-10-11 12:48:50 +00:00
Shing Him Ng a250c8eee4 Fix unused imports 2024-10-10 23:42:51 -05:00
Shing Him Ng 0c824c9c68 Implement Arbitrary for Block 2024-10-10 23:30:39 -05:00
Tobin C. Harding 5e0a07e74f
Use new Sequence::ENABLE_RBF_AND_LOCKTIME
We just renamed this and forgot to use the new name. This should have
been caught by CI.
2024-10-11 11:46:34 +11:00
merge-script fe62d94ff7
Merge rust-bitcoin/rust-bitcoin#3296: Remove the `SliceIndex` implementation from hash types
3b7ba4f977 Remove the SliceIndex implementation from hash types (Tobin C. Harding)

Pull request description:

  If folk really want to index into a hash they can us `as_byte_array` then index that.

  Includes a bump to the version number of `hashes` to `v0.15.0` - this is because otherwise `secp` won't build since we are breaking an API that is used in the current release of secp.

  Fix: #3115

ACKs for top commit:
  apoelstra:
    ACK 3b7ba4f977 successfully ran local tests

Tree-SHA512: 0ba93268cd8133fe683183c5e39ab8b3bf25c15bfa5767d2934d67a5f6a0d2f65f6c9304952315fe8a33abfce488d810a8d28400a28facfb658879ed06acca63
2024-10-10 22:39:21 +00:00
merge-script d5ebb19543
Merge rust-bitcoin/rust-bitcoin#3437: Move `block::Version` to primitives
70264bfcec Move block::Version to primitives (Tobin C. Harding)
819d8d72e8 Stop using private Version constructor (Tobin C. Harding)

Pull request description:

  This is a straight up move of the whole type because there are only three methods, a getter, a setter, and `is_signalling_soft_fork`.

  If we use an extension trait for `is_signalling_soft_fork` then we have to make the two private associated consts public which is in my opinion worse.

  Patch 1 is preparation, use getter/setter, patch 2 does the move.

ACKs for top commit:
  apoelstra:
    ACK 70264bfcec successfully ran local tests

Tree-SHA512: b61e853b4b96cb1cc56c7bfb67cc6c3ba7c631cb9e540393eb780dcf63bd2d934058794f2ac0145b4b5404a6a68887c3a1d225b2d87b57415474c05d3ef2811f
2024-10-10 21:28:44 +00:00
merge-script 27f6f17974
Merge rust-bitcoin/rust-bitcoin#3430: Add checked div by weight to amount
a0c58a4a8b Add checked weight division to Amount (yancy)
8def40a991 Add assertions to checked_weight_mul test (yancy)
16ce70d3a6 Add div_by_weight test to fee_rate (yancy)

Pull request description:

  Adds the checked variant of `amount / weight`.  I also added a test to the non-checked version for comparison so the reviewer knows they compute the same way (integer division rounded down).

  Also added assertion to `checked_weight_mul test` showing the results are rounded up.

ACKs for top commit:
  tcharding:
    ACK a0c58a4a8b
  apoelstra:
    ACK a0c58a4a8b successfully ran local tests

Tree-SHA512: cf14123ed261d100e3261a720c26f8c10368f05225e32eaa246f25ab766d20515db5feb98335d4e3e08a8146a70db65ff64670da3f75e7764e8f86ef534d2663
2024-10-10 18:19:16 +00:00
merge-script 1784c514b9
Merge rust-bitcoin/rust-bitcoin#3449: Fix fuzztest failure
1f8fdc6ccb Fix type used in bytes_hashed addition (Jamil Lambert, PhD)
d37b8a5dd2 Fix HashEngine.length name change to bytes_hashed (Jamil Lambert, PhD)

Pull request description:

  In #3298 `HashEngine.length` was changed to `HashEngine.bytes_hashed` and changed from `usize` to `u64`.

  Behind a `hashes_fuzz` feature gate there were a couple of occurrences of length that had not been updated and caused a fuzztest failure.  These have been updated to the new name and type.

  Fix #3448

ACKs for top commit:
  tcharding:
    ACK 1f8fdc6ccb
  apoelstra:
    ACK 1f8fdc6ccb successfully ran local tests

Tree-SHA512: 980a1f9ec71d7984a172c2f9439281c3bb3f36cccfb5c83fcf7d61b8cfa753ada56f9cbc6e7495c09bc23aa0451ab1ec7dd2e58c1f2a9b8164b3e03129378251
2024-10-10 17:43:29 +00:00
merge-script aa66992827
Merge rust-bitcoin/rust-bitcoin#3451: Remove unnecessary lifetime
afa4e1ed56 Remove unnecessary lifetime (Tobin C. Harding)

Pull request description:

  Found by `rustc` after update to recent nightly version to `nightly-2024-10-06`.

ACKs for top commit:
  apoelstra:
    ACK afa4e1ed56 successfully ran local tests
  storopoli:
    ACK afa4e1ed56

Tree-SHA512: a4b592f243d7f63c6abe12acfb872068f309af4a6ee130cc3a454235b1d2a5f2ef9219ee64927aa39cff978535b1b0944a4e19d1c8e30d00e390e982ea4b3574
2024-10-10 17:07:44 +00:00
Tobin C. Harding 323e706113
Add rustfmt config option style_edition
rustfmt is emitting:

Warning: the version option is deprecated. Use style_edition instead.

As suggested add a config option and set it to 2021.
2024-10-10 10:41:16 +11:00
Tobin C. Harding 2e4179ed0f
Run the formatter
Run `just fmt`, no other manual changes.
2024-10-10 10:39:53 +11:00
Tobin C. Harding 2c40b4f4ec
Configure formmater to skip read_compact_size 2024-10-10 10:39:36 +11:00
Tobin C. Harding afa4e1ed56
Remove unnecessary lifetime
Found by rustc, after update to recent nightly version to
`nightly-2024-10-06`.
2024-10-10 10:18:49 +11:00
Jamil Lambert, PhD 1f8fdc6ccb
Fix type used in bytes_hashed addition
`length` was changed to `bytes_hashed` and the type changed from `usize`
to `u64`.

The addition under the `hashes_fuzz` feature flag has been changed from
`usize` to `u64` to fix the fuzz error.
2024-10-09 16:19:07 +01:00
Jamil Lambert, PhD d37b8a5dd2
Fix HashEngine.length name change to bytes_hashed
When `hashes_fuzz` is on the field `length` is refered to but it was
changed to `bytes_hashed` in a previous PR.

This has been fixed by changing `length` to `bytes_hashed`.
2024-10-09 16:17:20 +01:00
merge-script 78bcca71ca
Merge rust-bitcoin/rust-bitcoin#3443: Input weight prediction helpers for nested P2WPKH
aa1fd5f44c Update the doc for InputWeightPrediction::weight() (spacebear)
8fd53c8ecf Add nested P2WPKH helpers to InputWeightPrediction (spacebear)

Pull request description:

  Following up on https://github.com/rust-bitcoin/rust-bitcoin/issues/630#issuecomment-2392050517.

  I amended the docstring on `InputWeightPrediction::weight()` to clarify that it only returns the signature weight. I'm not sure what the rationale was for only returning partial input weight, and if there are any arguments against something like `InputWeightPrediction::total_weight()` which returns `self.weight() + Weight::from_non_witness_data_size(32 + 4 + 4)` (and maybe deprecate `weight()` eventually to prevent misuse).

ACKs for top commit:
  apoelstra:
    ACK aa1fd5f44c successfully ran local tests
  tcharding:
    ACK aa1fd5f44c

Tree-SHA512: 9bdd882164a80a1a1a44c593750aa59e470f2928c0380d4d53a0409add597844cf11945785264ebd6b281029b3f2ef1be6c77e1e9cd148192dbd601df30a60ae
2024-10-09 15:06:46 +00:00
yancy a0c58a4a8b Add checked weight division to Amount 2024-10-09 09:30:09 -05:00
merge-script 0a83e5336d
Merge rust-bitcoin/rust-bitcoin#3439: sequence: clarify sequence constant name and add FINAL
4499b5c95b feat: rename ENABLE_RBF_NO_LOCKTIME to ENABLE_LOCKTIME_AND_RBF (ChrisCho-H)
861d97de36 feat: add FINAL constant to disable all (ChrisCho-H)

Pull request description:

  c24630e7b13312ea34f0f54ed832783ced8dde3f
  - `LOCKTIME` is used for both absolute and relative one without clear classification, which is confusing and could lead to an unexpected bug. Although it's API breaking change, current constant is so ambiguous unless understand the details of `LOCKTIME` semantic.

  9cc5dfeef178f03ea4d0786cfbaa3b8709fed644
  - Add constant `ENABLE_ALL` and `DISABLE_ALL`, which is useful for those who want to enable(disable) rbf, absolute/relative locktime.

ACKs for top commit:
  tcharding:
    ACK 4499b5c95b
  apoelstra:
    ACK 4499b5c95b successfully ran local tests

Tree-SHA512: dbea5ae911556d53025078e7193f0972d5e8ba354f69692091b2b05cc441e270f25eafa55b144a6970de42d8f596a2b0103cdee463c3126d5d9986cee88ce8fc
2024-10-08 02:46:11 +00:00
merge-script 6892b62fd2
Merge rust-bitcoin/rust-bitcoin#3440: Add stricter rustdoc requirement to `CONTRIBUTING.md`
2d32e74542 Add stricter rustdoc requirement (Jamil Lambert, PhD)

Pull request description:

  Example code in rustdocs should be error free and not produce warnings when copy pasted.

  The section on rustdocs has been expanded to clarify that example code should compile without any errors or warnings with the stricter `lint` that has been added to the justfile.

  All existing example code in the rustdocs has now been fixed and there are no warnings from unused code, the justfile has been updated to have a stricter `lint` which produces warnings and this addition to `CONTRIBUTING.md` has clarified that new additions should follow these rules.

  Close #3362

ACKs for top commit:
  apoelstra:
    ACK 2d32e74542 successfully ran local tests
  tcharding:
    ACK 2d32e74542

Tree-SHA512: 751475b4b8e9cfa35dba9f9708bb38e099387c24c330e6334fe97170273cfa63e4eb74fad51949d2fdf1dae9fe0dd56b85c043e6d6d4bb450eca35418a711e2b
2024-10-07 19:06:26 +00:00
merge-script 31f1a12aaf
Merge rust-bitcoin/rust-bitcoin#2945: Support Testnet4 Network
2424b654d5 feat: rust-bitcoin supports testnet4 (BinChengZhao)
afa91a2030 Introduce TestnetVersion enum with only TestnetV3 (BinChengZhao)

Pull request description:

  Fixed: https://github.com/rust-bitcoin/rust-bitcoin/issues/2749

  1. Adjust `Network` to support `Testnet4`. (Based on https://github.com/rust-bitcoin/rust-bitcoin/issues/2749#issuecomment-2152366608 as an implementation idea.)

  2. Handle conflicting procedure macros and declaration macros, since the original macros can't handle the new `Network::Testnet(TestnetVersion)` structure properly, and make internal implementations compatible with previous versions (e.g., `testnet` for `Testnet3`, `testnet4` for `Testnet4`, to minimize user-side effects).

  3. add `Testnet4` related Params, Block.

  4. optimize compatibility test cases.

  5. Regarding `fn: genesis_block`, calling `bitcoin_genesis_tx` with any Network type internally gets a reasonable `merkle_root`, but not `Testnet4`. (By comparison, I confirmed that the built-in transaction data provided is correct, and combined with the fixed `merkle_root` of `Testnet4` the correct block hash can be computed, which is not possible if the transaction data is incorrect.) **I'd appreciate it if some developer could guide me on what the problem is, and I'll work on it.**

  Of course, all these changes are based on https://github.com/rust-bitcoin/rust-bitcoin/issues/2749 , and the consensus of the discussion, if you have any comments, please leave a message, I will actively improve, and promote the support of `Testnet4`.

ACKs for top commit:
  tcharding:
    ACK 2424b654d5
  apoelstra:
    ACK 2424b654d5 successfully ran local tests

Tree-SHA512: a501f0a320460afdad2eb12ef6ff315b6357b7779dfe7c7028ea090da567019c947599006a06b3834265db1481129752f015629ef72fea6f862d01323ce9d024
2024-10-07 17:15:04 +00:00
BinChengZhao 2424b654d5 feat: rust-bitcoin supports testnet4 2024-10-05 23:47:21 +08:00
ChrisCho-H 4499b5c95b feat: rename ENABLE_RBF_NO_LOCKTIME to ENABLE_LOCKTIME_AND_RBF 2024-10-05 18:39:26 +09:00
spacebear aa1fd5f44c
Update the doc for InputWeightPrediction::weight()
Clarify that the returned weight doesn't include txid, index, or
sequence weights.
2024-10-03 19:44:28 -04:00
spacebear 8fd53c8ecf
Add nested P2WPKH helpers to InputWeightPrediction
Add helpers for input weight predictions corresponding to P2WPKH nested
in a P2SH output (nested segwit).
2024-10-03 19:32:57 -04:00
ChrisCho-H 861d97de36 feat: add FINAL constant to disable all 2024-10-03 22:51:49 +09:00
merge-script bb38aeb786
Merge rust-bitcoin/rust-bitcoin#3376: Release tracking PR: `bitcoin-io v0.2.0`
fed94f8899 Bump version of bitcoin-io to 0.2.0 (Tobin C. Harding)

Pull request description:

  In preparation for releasing `io v0.2.0` bump the version number, add a changelog entry, update the lock files, and depend on the new version in all crates that depend on `io`.

ACKs for top commit:
  apoelstra:
    ACK fed94f8899 successfully ran local tests

Tree-SHA512: f31765a24f1b41665f0c2c3cd5b14fb08f8ad0ea348c08f1e262ee2bc4d7fb63451bca79f4ac0f65a3050251d7cec1470dbeb1cea3fb82b3fa29ad5efc906f5c
2024-10-03 13:19:23 +00:00
BinChengZhao afa91a2030 Introduce TestnetVersion enum with only TestnetV3 2024-10-03 18:40:06 +08:00
Jamil Lambert, PhD 2d32e74542
Add stricter rustdoc requirement
Example code in rustdocs should be error free and not produce warnings
when copy pasted.

The section on rustdocs has been expanded to clarify that example code
should compile without any errors or warnings with the stricter `lint`
that has been added to the justfile.
2024-10-03 10:10:34 +01:00
Tobin C. Harding 3b7ba4f977
Remove the SliceIndex implementation from hash types
If folk really want to index into a hash they can us `as_byte_array`
then index that.

Includes a bump to the version number of `hashes` to `v0.15.0` - this
is because otherwise `secp` won't build since we are breaking an API
that is used in the current release of secp.

Fix: #3115
2024-10-02 10:18:45 +10:00
Tobin C. Harding fed94f8899
Bump version of bitcoin-io to 0.2.0
In preparation for releasing `io v0.2.0` bump the version number,
add a changelog entry, update the lock files, and depend on the new
version in all crates that depend on `io`.
2024-10-02 09:47:10 +10:00
Tobin C. Harding 70264bfcec
Move block::Version to primitives
This is a straight up move of the whole type because there are only
three methods, a getter, a setter, and `is_signalling_soft_fork`.

If we use an extension trait for `is_signalling_soft_fork` then we
have to make the two private associated consts public which is in my
opinion worse.
2024-10-02 09:35:23 +10:00
Tobin C. Harding 819d8d72e8
Stop using private Version constructor
In preparation for moving the `block::Version` type over to `primitives`
stop using the private constructor and inner field. Use the public
getter/setter instead (`to_consensus`and `from_consensus` respectively).
2024-10-02 09:35:23 +10:00