Commit Graph

6260 Commits

Author SHA1 Message Date
Jamil Lambert c4d9c1b9f8
Use a consistent rustdoc heading level of H1 `#`
There was and inconsistent usage of `#`, `##` and `###` in rustdoc
headings.  The difference in the rendered rustdocs is a minimal font
size change.

Change all headings to be H1 `#`.

Change all subheadings to be `###` to have a noticeable difference in
font size in the rendered docs.
2025-04-22 13:06:32 +01:00
Jamil Lambert 6325a7cdea
Change rustdoc heading level of references
`Bitcoin Core References` used H3 `###` in rustdocs, and one occurrence
had another `References` heading above it.

Change them to be H1 `#` like other headings.

Remove the redundant `References` heading.  NB. there are no other
occurrences of `# References` in this crate.
2025-04-22 12:55:48 +01:00
Jamil Lambert f22e997587
Use parameters instead of arguments in rustdocs
The rustdocs use both `# Parameters` and `# Arguments` to mean the same
thing.

Change all of them to `# Parameters` to be consistent.
2025-04-22 10:43:13 +01:00
Jamil Lambert e2c7be6d2f
Fix typo 2025-04-22 10:39:43 +01:00
merge-script ddd27eddc4
Merge rust-bitcoin/rust-bitcoin#4377: fix errors input.rs
55119c6a7b fix errors input.rs (Fallengirl)

Pull request description:

  hey team ! I found simple errors and fixed them
  HSAH160 - HASH160
  HAS256 - HASH256

ACKs for top commit:
  apoelstra:
    ACK 55119c6a7bdb92538728033652dc4d6a6c0a9220; successfully ran local tests

Tree-SHA512: 6f803ea290b4b7c3eb68fcea94fa5956bbe587c428a64c12388122a1c5c8d0a30489467bf464a6b701524990fbe4a9046072cbf6ec6800594c0e590d10744784
2025-04-21 23:14:55 +00:00
Fallengirl 55119c6a7b
fix errors input.rs 2025-04-21 23:23:59 +02:00
merge-script 2d8ebb79c3
Merge rust-bitcoin/rust-bitcoin#4375: Add ControlBlock constructor that takes a hex string
3319e6ef6d Add ControlBlock constructor that takes a hex string (Shing Him Ng)

Pull request description:

  Closes #4362

ACKs for top commit:
  Kixunil:
    ACK 3319e6ef6d
  apoelstra:
    ACK 3319e6ef6dd964f40e6e880843648c112a6b74ed; successfully ran local tests

Tree-SHA512: 230e4607402b3df6a8c5fe1e03209573baffbd08ca9d28e1208bff1464668a083ddb5ae72781eceb2546bc99b150dd2f832d122570d55aa323c603481c5eff93
2025-04-21 16:57:41 +00:00
merge-script 4a5ea9af53
Merge rust-bitcoin/rust-bitcoin#4370: Accessing XOnlyPublicKey from bitcoin::taproot
87d1210156 accessing XOnlyPublicKey from bitcoin::taproot (aagbotemi)

Pull request description:

  This PR fixes #4363

  `XOnlyPublicKey` is now made available from `bitcoin::taproot`.

ACKs for top commit:
  apoelstra:
    ACK 87d1210156f6a39b1e59f098bc520dba6f02a5b4; successfully ran local tests

Tree-SHA512: 7ea0ee330d32e5413d06deb70d920396ebd275ce65841d6eadac318aab4e728629c57c828722df4e1cb3130bb72f4170f32218ec25ec243d99f0094094d8f9da
2025-04-21 15:33:07 +00:00
merge-script 353992f33a
Merge rust-bitcoin/rust-bitcoin#4368: test: add test for push slice minimal
2b37583ca5 test: add test for push slice minimal (ChrisCho-H)

Pull request description:

  Following https://github.com/rust-bitcoin/rust-bitcoin/pull/4322.
  Test `push_slice` and `push_slice_nom_minimal` from OP_1...OP_16 and OP_1NEGATE.

ACKs for top commit:
  apoelstra:
    ACK 2b37583ca55195965ce2f129d75a1fc114d8b5f6; successfully ran local tests

Tree-SHA512: 6d8e96d522d317d7ede2f1bc133050d98ccbc1816c59fe3589003de249828367314f751d3a75d6b58b0c90b1b735f85650c0d7acebaf5da21a38fb651ab4177d
2025-04-21 14:54:24 +00:00
merge-script b67b9de765
Merge rust-bitcoin/rust-bitcoin#4369: Rename `try_into_taptree` to `try_into_tap_tree`
73317c1c31 rename try_into_taptree into try_into_tap_tree - docs(taproot): hide deprecated try_into_taptree (aagbotemi)

Pull request description:

  The PR introduces a new function `try_into_tap_tree()` to replace `try_into_taptree()`. `try_into_taptree()` has been deprecated.

  This PR fixes #4364

ACKs for top commit:
  apoelstra:
    ACK 73317c1c31271b65eb50c45353bf7393eba1154b; successfully ran local tests

Tree-SHA512: 5d853ea05a8cacfc0a27a93bed4351409abf5f93e53b308d62efdc3966c8403a4a857e39882eb84e511b637763ddb9629be832c2079057d81fa1c1984bcb8ad7
2025-04-21 14:21:58 +00:00
merge-script 3e6de4604e
Merge rust-bitcoin/rust-bitcoin#4366: Deserialize witness from a list of hex strings
e0b627ea81 deserialize witness from a list of hex strings - ci(primitives): enable hex feature in CI build - from_hex() implemented more efficiently (aagbotemi)

Pull request description:

  This PR implements `from_hex` function for deserialize `Witness` from a list of hex strings. Added unit test.

  This PR fixes #4350

ACKs for top commit:
  apoelstra:
    ACK e0b627ea816a730949cdb200105598600fcac094; successfully ran local tests
  tcharding:
    ACK e0b627ea81

Tree-SHA512: deec3f9e5f67a0915b11a811c40c341dd9f24d0394d6cfbd6a09f765ce3fc0dcce2740949c264d4aa2d2db748a5ce81416b4dac15b1b64475a7c024b205e40ab
2025-04-21 13:36:56 +00:00
Shing Him Ng 3319e6ef6d Add ControlBlock constructor that takes a hex string 2025-04-20 23:13:01 -05:00
merge-script fa2cda8513
Merge rust-bitcoin/rust-bitcoin#4371: Allow using the 'base64' feature in `no_std` environments
418445f26b Allow using the 'base64' feature in no_std environments (Salvatore Ingala)

Pull request description:

  Gating like the other features should do the trick.

ACKs for top commit:
  apoelstra:
    ACK 418445f26bc344546c756d9a1991f4e2e75da745; successfully ran local tests; nice!
  Kixunil:
    ACK 418445f26b

Tree-SHA512: f21e126302f18a261be3b6a16253901017bf3caaa0c1c2e82681d00355f291a5772c793bf376e5746aa2afcc0c8b2c2f85a11ae6f6a90e6fc4e732ce4db89ee7
2025-04-20 21:31:33 +00:00
merge-script 8276e4d0e5
Merge rust-bitcoin/rust-bitcoin#4372: Automated nightly rustfmt (2025-04-20)
2c1ce53deb 2025-04-20 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 2c1ce53deb2fb2dc56546c9151c5fb61520f4713; successfully ran local tests

Tree-SHA512: 566535deece199d3a19910d6b033f8bf3ddbce27092f218041ebb1694b5f6184e4851ae9a54ddd0887c56f73e8083441e1769785109688c3c6f2a57120805229
2025-04-20 20:11:56 +00:00
merge-script aa804ee1b1
Merge rust-bitcoin/rust-bitcoin#2456: Use InputWeightPrediction to calculate effective_value
f6105ea417 Use InputWeightPrediction to calculate effective_value (yancy)

Pull request description:

  closes: https://github.com/rust-bitcoin/rust-bitcoin/issues/2455

  Also, what about moving `effective_value` to `InputWeightPrediction`?

  Marking as a draft until we can add api changes again.

ACKs for top commit:
  apoelstra:
    ACK f6105ea4171a85ce21443d7eb76b7aa9cadab53a; successfully ran local tests; yeah, this API does look nicer
  Kixunil:
    ACK f6105ea417

Tree-SHA512: 20592e49cb93343b1aefa340c3c870e2e21c747711da68a6aa57342f59ff2981c30e9c91de7eab32bcd11da33f040f9df62008db991d93b549079f91a6908055
2025-04-20 19:36:22 +00:00
merge-script 8ca3a430c7
Merge rust-bitcoin/rust-bitcoin#4336: units: Make minor improvements to `MathOp`
0f62c9a582 units: Make minor improvements to MathOp (Tobin C. Harding)

Pull request description:

  Follow up from #4312, improve the `MathOp` type by:

  - Do not provide public constructor
  - Add cast protection

ACKs for top commit:
  apoelstra:
    ACK 0f62c9a5822a813be5c6f6b19d160458243f174a; successfully ran local tests
  Kixunil:
    ACK 0f62c9a582

Tree-SHA512: dbb06c5afd8df5364a2aec12b7c8632620a1e8f3955b83e91a9b4f5c2e0daaa1ecdb050d8e395e95bf018d718847cddbf3338bd89f70cbb0382bf5e080d5cf21
2025-04-20 16:35:47 +00:00
aagbotemi e0b627ea81
deserialize witness from a list of hex strings
- ci(primitives): enable hex feature in CI build
- from_hex() implemented more efficiently
2025-04-20 15:53:52 +01:00
Fmt Bot 2c1ce53deb 2025-04-20 automated rustfmt nightly 2025-04-20 01:36:29 +00:00
Salvatore Ingala 418445f26b
Allow using the 'base64' feature in no_std environments 2025-04-19 19:31:11 +02:00
aagbotemi 73317c1c31
rename try_into_taptree into try_into_tap_tree
- docs(taproot): hide deprecated try_into_taptree
2025-04-19 16:54:01 +01:00
aagbotemi 87d1210156
accessing XOnlyPublicKey from bitcoin::taproot 2025-04-19 16:26:19 +01:00
ChrisCho-H 2b37583ca5 test: add test for push slice minimal
Test push_slice and push_slice_nom_minimal from OP_1...OP_16 and OP_1NEGATE
2025-04-19 14:23:31 +09:00
merge-script c85648cfd4
Merge rust-bitcoin/rust-bitcoin#4322: fix: enforce standard minimal push for push_slice
354e1e42ad fix: enforce minimal push for push_slice (ChrisCho-H)

Pull request description:

  Currently `push_slice` doesn't check the standard minimal push rule, which could result in possible money loss(e.g. if non minimal push is used in output script of p2wsh or p2tr).
  Introduce `push_slice_non_minimal` to provide the way to push as now, and change `push_slice` logic to follow standard minimal push rule.

  99a4ddf5ab/src/script/script.cpp (L366)

ACKs for top commit:
  tcharding:
    ACK 354e1e42ad
  apoelstra:
    ACK 354e1e42ad98c7968827d03be563bc14d764a983; successfully ran local tests

Tree-SHA512: 01f53dbd2a1a3c9a9e4387f0aaa7801f9c4570996054503a38d09ed1646ab65a3249d227adcf4139ac37a111d795e6cf986c4c273d5660c20820d1b36ba46f57
2025-04-18 14:23:53 +00:00
merge-script 89d7b3fe24
Merge rust-bitcoin/rust-bitcoin#4358: Capitalize Taproot in rustdocs
c4ff2baa5a Capitalize Taproot in rustdocs (Jamil Lambert)

Pull request description:

  Some recent additions to the rustdocs used a lowercase t in taproot.

  Capitalize all cases of Taproot in rustdocs to be consistent.

  Closes #4354

ACKs for top commit:
  tcharding:
    ACK c4ff2baa5a
  apoelstra:
    ACK c4ff2baa5a7c841ecdfe0e8a92b0a1a664f203ae; successfully ran local tests

Tree-SHA512: 620ccf769a6dad3bcdfec8a0460f6f1bbf90780e280ca94317f6048117aaad06c41a90cd3ee00d670f799459316c1f84e96e4ce3ef3a44818243b21c2f41924b
2025-04-18 13:04:17 +00:00
merge-script 9b455ffe83
Merge rust-bitcoin/rust-bitcoin#4359: fix `rejectection` to `rejection` message_network.rs
79f6530c86 fix rejectection to rejection message_network.rs (Alex Pikme)

Pull request description:

ACKs for top commit:
  apoelstra:
    ACK 79f6530c864e06316a80dae0842762352527def3; successfully ran local tests

Tree-SHA512: 0b8875780365496ce9621c0ca8bb7617fd458bb618e0bd93607245a9e326509c2a5817b8a650722a54c24ea3cd673345c63d3b4d2ef01ff074e09d2c0e5b235e
2025-04-18 01:38:55 +00:00
merge-script 6241b34afc
Merge rust-bitcoin/rust-bitcoin#4319: units: Implement privacy boundaries
6323867c65 Run the formatter (Tobin C. Harding)
d5c08aef32 units: Update column width (Tobin C. Harding)
f7f1a0be8c Add privacy boundary to BlockTime (Tobin C. Harding)
b3dfe0df3f Add privacy boundary to Weight (Tobin C. Harding)
e1a14b3c2d Add privacy boundary to FeeRate (Tobin C. Harding)
4b733d4dad Run the formatter (Tobin C. Harding)

Pull request description:

  Add privacy boundary for `FeeRate`, `BlockTime`, and `Weight`. The lock times are a bit curly so just doing these ones for now.

ACKs for top commit:
  apoelstra:
    ACK 6323867c65cdbf0f1b25d252fded6873acd35a3a; successfully ran local tests

Tree-SHA512: b6cf5eb032e055414f48f3469ec1748635b9f53ca64c158bd861d1ae6e2cfbe7b4d82de98f7dc90913d98429e6ae6991a4a61b6c438574fcbef9b3bc7ebafb4b
2025-04-17 22:07:20 +00:00
Alex Pikme 79f6530c86
fix rejectection to rejection message_network.rs 2025-04-17 21:13:12 +02:00
Jamil Lambert c4ff2baa5a
Capitalize Taproot in rustdocs
Some recent additions to the rustdocs used a lowercase t in taproot.

Capitalize all cases of Taproot in rustdocs to be consistent.
2025-04-17 18:02:35 +01:00
merge-script 30c1933d16
Merge rust-bitcoin/rust-bitcoin#4347: primitives: Increase test coverage in `Script`
b4b61cb884 Add tests to increase coverage (Jamil Lambert, PhD)
6bcc6b703d Expand display test to cover debug and OP_0 (Jamil Lambert, PhD)
8a096b77d5 Expand as_ref and as_mut tests (Jamil Lambert, PhD)
afa51f7bfa Add missing empty line, and remove extra one (Jamil Lambert, PhD)

Pull request description:

  Expand existing tests and add new ones to increase the test coverage in `primitives/src/script/` to 100% excluding `serde` and `arbitrary` features.

ACKs for top commit:
  apoelstra:
    ACK b4b61cb8849d5d536532474691c5d9f10c146672; successfully ran local tests
  tcharding:
    ACK b4b61cb884

Tree-SHA512: 6c37a194e5a94fe04bb26d4e904bd98efc75bd433b59aa09b1c102df96b753602d3ad6540ed9941827f03c7d38e7bbb8b10bbcc8c6ab52b8f96b83743eec4519
2025-04-17 15:05:33 +00:00
Tobin C. Harding 6323867c65
Run the formatter 2025-04-17 11:43:05 +10:00
Tobin C. Harding d5c08aef32
units: Update column width
Update column width inside the new `encapsulate` modules.

No content change.
2025-04-17 11:43:05 +10:00
Tobin C. Harding f7f1a0be8c
Add privacy boundary to BlockTime
As per policy in #4090 add a privacy boundary to the `BlockTime` type.
Use the module name `encapsulate` as is done in `amount` - its private
so the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding b3dfe0df3f
Add privacy boundary to Weight
As per policy in #4090 add a privacy boundary to the `Weight` type. Use
the module name `encapsulate` as is done in `amount` - its private so
the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding e1a14b3c2d
Add privacy boundary to FeeRate
As per policy in #4090 add a privacy boundary to the `FeeRate` type. Use
the module name `encapsulate` as is done in `amount` - its private so
the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding 4b733d4dad
Run the formatter 2025-04-17 11:43:02 +10:00
merge-script 94abc99fb0
Merge rust-bitcoin/rust-bitcoin#4318: Document the `NumOpResult` type
c30a504ea6 units: Document the NumOpResult type (Tobin C. Harding)

Pull request description:

  Document the `NumOpResult` type.

  Note that this includes two new getters on the `NumOpResult`, API hole found during review of the new docs.

  Fix: #4222

ACKs for top commit:
  apoelstra:
    ACK c30a504ea6a5140bdf5667ea42b76bdfa2457456; successfully ran local tests; nice!

Tree-SHA512: ab8d971b74ff4bb06f5737943740c5c748f6313ce1b82798c7d709f8747779efdffe0aa8ed8620afa449fd0dd502b5a2050729a538c51428215972a4f7b6ebf7
2025-04-17 11:35:03 +10:00
ChrisCho-H 354e1e42ad fix: enforce minimal push for push_slice 2025-04-17 06:03:57 +09:00
merge-script 9364cd1f7c
Merge rust-bitcoin/rust-bitcoin#4343: units: Go over the rendered docs for the whole crate
913360b112 Make struct titles consistent (Jamil Lambert, PhD)
afe9ddd5e6 Remove - in fee rate (Jamil Lambert, PhD)
ebc6b4a876 Make warning text bold (Jamil Lambert, PhD)

Pull request description:

  I have read through all of the `units` docs and made a few changes.

  - Highlight `Warning!` in bold in `Amount` and `SignedAmount`

  - Change the one occurrence of fee-rate to fee rate to be consistent with the rest.

  - Make all of the error structs have the same title format of `Error returned...`

  - Make all other structs have the same format concisely stating what it is opposed to what it does.

ACKs for top commit:
  tcharding:
    ACK 913360b112

Tree-SHA512: 4cb08d1dae091f5b827cf9f1e931b057c6670002146a22da54886148f3052f6ea7050fcd7f62c0d83438ef170e2f109c1a36f47a280808f31466da6f3177dd01
2025-04-16 19:10:02 +00:00
merge-script b473a2090a
Merge rust-bitcoin/rust-bitcoin#4258: units: Improve code enforcing privacy boundry
ca6c607953 Adhere to sanity rules for amount types (Tobin C. Harding)
6c614d9320 units: Fix panic message (Tobin C. Harding)

Pull request description:

  This is a follow up to #4256 - onwards and upwards!

  - Patch 1: Fix the incorrect BTC value in panic message
  - Patch 2: Strictly adhere to the sanity rules (#4090)

   Close: #4140

ACKs for top commit:
  apoelstra:
    ACK ca6c607953c03aa2dc168f58329681d9e69eee04; successfully ran local tests

Tree-SHA512: 6d7fd60830e1a0f6d6262ab02ec6e297b095d0fe8fb7737563979652e4a3b4a9477a79982201c42b08e2555fd23dc5c430549966b534bdf45f40621ae81da83a
2025-04-16 18:33:09 +00:00
Jamil Lambert, PhD b4b61cb884
Add tests to increase coverage
There are missed lines in coverage when running `cargo tarpaulin` on
`Script`.

Add tests to cover all lines missed except for `serde`.
2025-04-16 19:19:22 +01:00
merge-script 188b4f439e
Merge rust-bitcoin/rust-bitcoin#4269: Implement `Display` for `Header`
e3b059cebf Implement Display for block::Header (Tobin C. Harding)

Pull request description:

  Not all the fields within `block::Header` implement `Display` however a block header can reasonably be displayed by using 160 hex characters.

  Implement `Display` for `block::Header` by printing the header in hex in the same layout as we hash it in `block_hash`.

  Close: #3658

ACKs for top commit:
  apoelstra:
    ACK e3b059cebfb917c3a876cc5a39d942d2dead475c; successfully ran local tests

Tree-SHA512: c1ff0d73562c9e00e93659f385a471c2d7912e1f09faf6c646bd7864d1a98e6e2baddebfcd1a032bf5adc3e27586022927261c8867098f7e7bf166bf35a9ffbd
2025-04-16 17:54:23 +00:00
Jamil Lambert, PhD 6bcc6b703d
Expand display test to cover debug and OP_0
Add to the test to cover the `fmt::Debug` impl without checking the
actual text.

Change one of the opcodes so that the display of the special case OP_0
is checked.
2025-04-16 18:21:50 +01:00
Jamil Lambert, PhD 8a096b77d5
Expand as_ref and as_mut tests
The tests for both `Script` and `ScriptBuf` `as_ref` and `as_mut` only
covered the `u8` impl.

Expand the tests to cover the `Self` impl as well.

The allow useless_asref is required to remove a clippy lint.  Removing
the "useless" as_ref also removes the test coverage of the as_ref or
as_mut impl.
2025-04-16 18:21:50 +01:00
Jamil Lambert, PhD afa51f7bfa
Add missing empty line, and remove extra one
Make all tests functions have a single blank line between them
2025-04-16 18:21:43 +01:00
merge-script 0afe65f01f
Merge rust-bitcoin/rust-bitcoin#4017: hashes: Add an `api` test module
f268ca20c5 hashes: Add api test file (Tobin C. Harding)

Pull request description:

  As we did for `units` and as part of the stabalization effort.

  Add an `api` test module that verifies the public API for the `hashes` crate.

  Close: #3927

ACKs for top commit:
  apoelstra:
    ACK f268ca20c5855c751df76eaaff333e31408a4d9e; successfully ran local tests

Tree-SHA512: d3c1675ba01d2d250c677a2d4b52c3a500417a50e9af40d6596c279cdb798aa96bf423de92492a83880377fa40f50bf906765123c6bc722799fd4786da372c1f
2025-04-16 15:51:18 +00:00
merge-script 1134abce97
Merge rust-bitcoin/rust-bitcoin#4338: primitives: Document script to/from bytes
35ca48a85c primitives: Document script to/from bytes (Tobin C. Harding)

Pull request description:

  The byte slice/vector in the to/from methods for the script types does not include the length prefix that is used when consensus encoding.

  Add docs to make this more clear.

ACKs for top commit:
  apoelstra:
    ACK 35ca48a85cd90fc9c1b13da439177a4772c1c330; successfully ran local tests; yeah, I like this

Tree-SHA512: 6efeddfd8fe9e5bb32a6d40ca1a0fa3aa686047ad9f4cb865e3c70f8339cd39c18daa01441a1a5898300b1e73150b39c53d507af528830bbd68904148b65ef35
2025-04-16 15:08:34 +00:00
merge-script 551b52c7d1
Merge rust-bitcoin/rust-bitcoin#4348: refactor: Replace fold with try_fold
812c21e2e4 refactor: Replace fold with try_fold (yancy)

Pull request description:

  The and_then combinator performs a kind of bitwise and operation on two Option types here.  This is useful since the `checked` arithmetic returns an option thereby accumulating Option types.  Therefore, either the checked arithmetic operation performs the addition of the unwrapped accumulator, or it returns None.

  Instead of using `and_then` use the provided `try_fold` method which will short circuit on `None` when the checked arithmetic is used.  Also, simplify the staring condition using `Amount:ZERO` since this is logically equivalent to using the first value if one exists.

  Lastly, by using the built in `try_fold`, it's possible the performance will be improved by making use of the short circuit ability instead of evaluating each item even when the accumulator holds a None type.

ACKs for top commit:
  apoelstra:
    ACK 812c21e2e4a868046b44728c1a6209a866452820; successfully ran local tests
  tcharding:
    ACK 812c21e2e4

Tree-SHA512: 1cfcd4fa28e2b59daf3744bb5f654f65eb9853c5a36f747cb0859783e7e46c1d02ccb296612b75f7cca10782979ce052cd670c0f23c1030e0a347000d1f6df83
2025-04-16 13:56:34 +00:00
Tobin C. Harding c30a504ea6
units: Document the NumOpResult type
The `NumOpResult` type is a bit unusual. Add thorough documentation
and example usage to it.
2025-04-16 18:17:09 +10:00
Tobin C. Harding e3b059cebf
Implement Display for block::Header
Not all the fields within `block::Header` implement `Display` however
a block header can reasonably be displayed by using 160 hex characters.

Implement `Display` for `block::Header` by printing the header in hex in
the same layout as we hash it in `block_hash`.
2025-04-16 17:24:41 +10:00
merge-script 7d05078b6a
Merge rust-bitcoin/rust-bitcoin#4349: minor docstring fixups message.rs
793920d6bf minor docstring fixups message.rs (Bilog WEB3)

Pull request description:

  Please fix this error, thank you

ACKs for top commit:
  apoelstra:
    ACK 793920d6bf7437e6f4f24d794818e885094992d8; successfully ran local tests

Tree-SHA512: 5e152299ceab2962ac841a3935877a2264654e7f1d296c0486b2548f57f9cc9106590f6fc92b0a4adaba44d909457e932cd706e76ab814067c5972afa4d8ab93
2025-04-16 00:13:03 +00:00