Commit Graph

1898 Commits

Author SHA1 Message Date
merge-script c40e2516ae
Merge rust-bitcoin/rust-bitcoin#3737: Improve rustdocs on addresses module
f85456a726 Improve rustdocs on addresses module (Tobin C. Harding)

Pull request description:

  These docs are stale, update them.

  - Mention segwit and legacy
  - Improve example code to show feature gating
  - Fix headings to be as typical

ACKs for top commit:
  storopoli:
    ACK f85456a726
  apoelstra:
    ACK f85456a726a201b26eac58d22eb0eb6a58ad411b; successfully ran local tests

Tree-SHA512: c1cdde744fb960c4119805e6b3fb0cc971eaa94173fb85f8f7a34daab7985a0f14c9be477d7dda430c6873fed7265c598b8dcfbffe0ed6a99ca8590a2b2b724e
2024-12-15 17:32:14 +00:00
Tobin C. Harding f85456a726
Improve rustdocs on addresses module
These docs are stale, update them.

- Mention segwit and legacy
- Improve example code to show feature gating
- Fix headings to be as typical
2024-12-15 09:29:48 +11:00
merge-script 1c4d66ab39
Merge rust-bitcoin/rust-bitcoin#3749: Remove unnecessary type
3ac9b2ded2 Remove unnecessary type (Tobin C. Harding)

Pull request description:

  `hex_psbt` returns `Psbt`, no need for the explicit type.

  Internal change only.

ACKs for top commit:
  shinghim:
    ACK 3ac9b2ded2
  apoelstra:
    ACK 3ac9b2ded24d5428945538c0a674301f6094df96; successfully ran local tests

Tree-SHA512: 2be1bfa56729bf97e60d721a184d3d21bfb27115fab1dd1b9103428658b5faca012d8f01e0458be7f17dadcd8cc495b327f2b472d825d46aa5cb71d0906ecb21
2024-12-14 17:48:02 +00:00
merge-script 25236ce697
Merge rust-bitcoin/rust-bitcoin#3746: bitcoin: Improve rustdocs on extern crates
a5993426fd bitcoin: Improve rustdocs on extern crates (Tobin C. Harding)

Pull request description:

  Make slight improvement to the extern crates we re-export from `bitcoin`.

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

Tree-SHA512: bb857316fc2606aa553f15e1c9fcf8dd87374e170121fe30cf9e44ae190f873f94c113af49b096cb49a65fd68d1bf24732e3f1aba04861e2ae934414f30473c6
2024-12-14 17:03:56 +00:00
merge-script fcbe970ddb
Merge rust-bitcoin/rust-bitcoin#3734: Move script hash types to `primitives`
6e01383f16 api: Run just check-api (Tobin C. Harding)
3855d3cc83 Move script hashes to primitives (Tobin C. Harding)
d1dd63d6d4 Remove wildcard in script re-exports (Tobin C. Harding)

Pull request description:

  Woops, this should have been done before v0.101.0 was released.

  Move the `ScriptHash` and `WScriptHash` types to `primitives`.

  Requires moving constants and error types as well. We re-export the errors because they are in the `mod.rs` file so they should appear in both `primitives::script::FooError` and `bitcoin::script::FooError`.

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

Tree-SHA512: 4ef838ee9c4cb3eb308ffa855ea5d6f5ad46f81c17b9413faa493a46a262afc18b47f28a0fdd5fc675eea31b895d0eb0e2505a523e820504ec88d9334d6874b4
2024-12-14 06:14:39 +00:00
merge-script 3c25a8acbc
Merge rust-bitcoin/rust-bitcoin#3753: Update to arbitrary v1.4
463fbd16f1 Update to arbitrary v1.4 (Tobin C. Harding)

Pull request description:

  Out with the old in with the new, update to the latest minor version of arbitrary.

  No real reason to do this except that I wanted to add the minor version instead of using just `1` so that we don't accidentally pull a new minor version in during a patch release (after we 1.0).

  (I'm unsure if this is necessary and did not test it against MSRV.)

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

Tree-SHA512: 88913f993b97abba224ba94ee9d5057894bb7142fef07e557de03a423da314a9f21632932fb64c4c27c676051bbb6e90d9b90bfa944af810e834bf42707d3cff
2024-12-14 01:39:38 +00:00
merge-script 7ab569388b
Merge rust-bitcoin/rust-bitcoin#3743: Refactor predict weight
0135cddc32 Refactor non_input_size (Tobin C. Harding)
f42f13cd8d Simplify closures in call to fold (Tobin C. Harding)

Pull request description:

  Two refactorings to make the code easier to read. No logic changes.

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

Tree-SHA512: 747cfe1212283a62545cb86a5af0be46592ab3b41f94ab0a2dad8f06b094c04eb9265520ece595d2aab303fddf55a652e7ef977911439602550c264bedd4385b
2024-12-13 23:58:31 +00:00
merge-script ee8430a527
Merge rust-bitcoin/rust-bitcoin#3738: Remove Weight::from_wu_usize function
3c8c956511 Remove Weight::from_wu_usize function (Tobin C. Harding)

Pull request description:

  This constructor is an anomaly in this repo. Also it is ugly to have the type parameter hard coded in the function name.

  The problem the constructor is trying to solve is that we don't like casts that don't obviously loose data. We have a solution for that already in `internals::ToU64`. This trait cannot be used in const contexts though so we do introduce a single cast in this patch.

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

Tree-SHA512: 168196edb7c151378d425b96ea3c9cdb0a4f6a879543e89facd02ed1fdf9bc69bde8ef862ffa0959b7c5ca21d6f4fe5ae38a933c379e7e88a946ca7cb68d61ec
2024-12-13 22:16:59 +00:00
merge-script 7977231839
Merge rust-bitcoin/rust-bitcoin#3751: Remove unnecessary rustdocs
99e2a9f530 Remove unnecessary rustdocs (Tobin C. Harding)

Pull request description:

  The `deprecated` attribute already fully explains the status of a deprecated function and the replacement - no need to repeat this.

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

Tree-SHA512: 133d41573a3ba97abf85100649c1e8dfe131521a627e0b7f1ab803845caf1c183b99488cb5d9f7e858cab1b35f8907a79b320ec01901b15fdd63d08f0bc1f87e
2024-12-13 20:01:34 +00:00
merge-script 66accdee08
Merge rust-bitcoin/rust-bitcoin#3748: Remove ToU64 from rustdocs
4ef06b4f2b Remove ToU64 from rustdocs (Tobin C. Harding)

Pull request description:

  The `ToU64` trait is not meant to be used publicly, remove the mention of it from rustdocs.

ACKs for top commit:
  shinghim:
    ACK 4ef06b4f2b
  apoelstra:
    ACK 4ef06b4f2b9945b46c190abd0cb3a6dfe234c7b5; successfully ran local tests

Tree-SHA512: e9acef9194cee380aa2aa44af9285d4f6e025bdf09f76e5066916c51215db15f1f920fd8ecf3cf079f0a2dddab0332b3a7df104f5bd61d12fc337b4ed163310c
2024-12-13 18:01:29 +00:00
Tobin C. Harding d066a863bf
Use backticks on amount types 2024-12-13 09:01:16 +11:00
Tobin C. Harding a5993426fd
bitcoin: Improve rustdocs on extern crates
Make slight improvement to the extern crates we re-export from
`bitcoin`.
2024-12-13 09:01:08 +11:00
Tobin C. Harding 4ef06b4f2b
Remove ToU64 from rustdocs
The `ToU64` trait is not meant to be used publicly, remove the mention
of it from rustdocs.
2024-12-13 09:00:53 +11:00
Tobin C. Harding 3ac9b2ded2
Remove unnecessary type
`hex_psbt` returns `Psbt`, no need for the explicit type.

Internal change only.
2024-12-13 09:00:41 +11:00
Tobin C. Harding 99e2a9f530
Remove unnecessary rustdocs
The `deprecated` attribute already fully explains the status of a
deprecated function and the replacement - no need to repeat this.
2024-12-13 09:00:20 +11:00
Tobin C. Harding 463fbd16f1
Update to arbitrary v1.4
Out with the old in with the new, update to the latest minor version of
arbitrary.

No real reason to do this except that I wanted to add the minor version
instead of using just `1` so that we don't accidentally pull a new minor
version in during a patch release (after we 1.0).
2024-12-12 15:44:45 +11:00
Tobin C. Harding 0135cddc32
Refactor non_input_size
Looks like the formatter has put code comments in the wrong place.

Refactor the `non_input_size` line so that the formatter does not mess
with it.
2024-12-12 15:34:22 +11:00
Tobin C. Harding f42f13cd8d
Simplify closures in call to fold
Remove unnecessary code comments and make the closure variable names more
terse with no loss of clarity.

Refactor only, no logic changes.
2024-12-12 15:34:12 +11:00
Tobin C. Harding 3c8c956511
Remove Weight::from_wu_usize function
This constructor is an anomaly in this repo. Also it is ugly to have the
type parameter hard coded in the function name.

The problem the constructor is trying to solve is that we don't like
casts that don't obviously loose data. We have a solution for that
already in `internals::ToU64`. This trait cannot be used in const
contexts though so we do introduce a single cast in this patch.
2024-12-12 15:21:29 +11:00
Tobin C. Harding 3855d3cc83
Move script hashes to primitives
Woops, this should have been done before v0.101.0 was released.

Move the `ScriptHash` and `WScriptHash` types to `primitives`.

Requires moving constants and error types as well. We re-export the
errors because they are in the `mod.rs` file so they should appear in
both `primitives::script::FooError` and `bitcoin::script::FooError`.
2024-12-12 15:14:00 +11:00
Tobin C. Harding d1dd63d6d4
Remove wildcard in script re-exports
We don't like wildcard re-exports anymore; explicitly re-export the
types from `primitives::script`.
2024-12-12 15:14:00 +11:00
merge-script e2de5162d9
Merge rust-bitcoin/rust-bitcoin#3717: base58ck: Bump version to 0.2.0
5b3e4ab95b base58ck: Bump version to 0.2.0 (Tobin C. Harding)

Pull request description:

  In preparation for release add a changelog entry, bump the version, and update the lock files.

ACKs for top commit:
  storopoli:
    ACK 5b3e4ab95b
  apoelstra:
    ACK 5b3e4ab95b015b5bba5b73db2052cbb63a901466; successfully ran local tests

Tree-SHA512: 8347b0540ccdfc29f4a03f0a3554142b4fbd39b519512dcc886c28cae75666201aa8a7e4a07999e70c0348e59f02c4c0d67541a20102153b36150f5e4748a89e
2024-12-11 16:58:08 +00:00
Tobin C. Harding adaf4ac086
Set avoid-breaking-exported-api to false
These lints are valuable, lets get at em.

Changes are API breaking but because the changes make functions consume
self for types that are `Copy` downstream should not notice the breaks.
2024-12-11 10:11:50 +11:00
Tobin C. Harding 5b3e4ab95b
base58ck: Bump version to 0.2.0
In preparation for release add a changelog entry, bump the version, and
update the lock files.
2024-12-10 13:47:29 +11:00
merge-script 8eda92ee7b
Merge rust-bitcoin/rust-bitcoin#3699: Explicitly define Ord for NodeInfo
428e9787d1 Explicitly define Ord for NodeInfo (Shing Him Ng)

Pull request description:

  Fixes #3654 by explicitly defining Ord so that we avoid potentially catastrophically changing addresses out from under users

ACKs for top commit:
  sanket1729:
    utACK 428e9787d1
  apoelstra:
    ACK 428e9787d181a462d06a18b7a45701790cbc0929; successfully ran local tests

Tree-SHA512: e900e07b2c53f643e3239bf7d26567b56275899b408a94e45f1cddd81217141c304c87159ce413a7a4660f1c09a0db2bbc1146948a2d9e7600abf14cd73ac691
2024-12-09 22:13:58 +00:00
Shing Him Ng 428e9787d1 Explicitly define Ord for NodeInfo 2024-12-09 09:15:12 -06:00
merge-script b579e1238f
Merge rust-bitcoin/rust-bitcoin#3693: Change `Amount::MAX` from `u64::MAX` to `Amount::MAX_MONEY`
6950c0a7b5 Change `Amount::MAX` to equal `MAX_MONEY` (Jamil Lambert, PhD)

Pull request description:

  As discussed in #3688 and #3691 using `u64::MAX` causes errors when converting to `f64` so `MAX_MONEY` is should be used as the maximum `Amount`.

   - `Amount::MAX` changed to equal `MAX_MONEY`
   - Add a check to add, multiply and from_str functions
   - Change tests to account for new lower maximum

  Different approach to the existing PR #3692.  I have only done Amount and not SignedAmount until there is feedback on which approach to use.

ACKs for top commit:
  tcharding:
    ACK 6950c0a7b5
  apoelstra:
    ACK 6950c0a7b507f9d70c1ebdab540634482f73b247; successfully ran local tests

Tree-SHA512: 03ebf39c47b19ba88d95235538039f28bfa29f4499618fab25c9b627684c348ed41caef682e8f0e01ca62cf9ced8a1183fe3ed861bffeb9609b09440ddfb1c92
2024-12-09 14:54:39 +00:00
Jamil Lambert, PhD 6950c0a7b5
Change `Amount::MAX` to equal `MAX_MONEY`
To prevent rounding errors converting to and from f64 change
`Amount::MAX` to `MAX_MONEY` which is below the limit in f64 that has
issues.

Add checks to `from_str_in`, `checked_add` and `checked_mul` that the
result is below MAX, where previously a u64 overflow was relied on.

Change tests to account for new lower MAX that is within the range of
SignedAmount and does not overflow so easily

Remove overflow tests

`Amount::MAX` is now below `u64::MAX` and within the range of values for
`SignedAmount`.   These tests therefore do not overflow.
In effective_value there is no error with `Amount::MAX` and the correct
value is returned.
In psbt the removed test is effectively the same as the previous test.

Modify `Amount` tests to work with new `MAX`

Tests need to be changed that checked values above the new `MAX` or
`Amount::MAX` was out of range for `SignedAmount` which it isn't anymore
2024-12-04 14:17:00 +00:00
Tobin C. Harding edab380ac0
bitcoin: Bump version to v0.33.0-alpha.0
Needs release notes but there are 20 pages of them, that feels like too
many to go through manually.

Includes a missing changelog entry in `units` for an already released
change that is included in this `bitcoin` release.
2024-12-04 15:58:36 +11:00
Shing Him Ng 8b41ecb427 Fix typo in re-export 2024-12-01 21:32:43 -06:00
merge-script 8acf3ec30a
Merge rust-bitcoin/rust-bitcoin#3684: refactor: remove unnecessary if block
b5a0731a23 refactor: remove unnecessary if block (Chris Hyunhum Cho)

Pull request description:

  This `if...else` block can be replaced with one `if` block, by changing `==` to `!=`.

ACKs for top commit:
  jamillambert:
    ACK b5a0731a23
  apoelstra:
    ACK b5a0731a23f945f7e4cc7d8f3c0f1d3f83875272; successfully ran local tests
  tcharding:
    ACK b5a0731a23

Tree-SHA512: eee0d63532953d27fe081c36180ae9adb63c0ab7f1fb8324d9fc5e4a408f421d8df894efcccfc4bd3142625d6be6ea1258c9478faa025ce147ebe1b4e9377738
2024-12-01 23:25:32 +00:00
Fmt Bot 0990b30035 2024-12-01 automated rustfmt nightly 2024-12-01 01:41:12 +00:00
Chris Hyunhum Cho b5a0731a23 refactor: remove unnecessary if block 2024-11-29 08:06:51 +00:00
merge-script 7d8b9bd883
Merge rust-bitcoin/rust-bitcoin#3673: units: Close the hex parse errors
22769268f3 units: Close the hex parse errors (Tobin C. Harding)

Pull request description:

  As part of the 1.0 effort close the errors in the `units::parse` module.

ACKs for top commit:
  apoelstra:
    ACK 22769268f34b45c0bd86c548eb13cfe1e290f0d7; successfully ran local tests; thanks!
  sanket1729:
    ACK 22769268f3

Tree-SHA512: 598ba236f8c08c3f750112e0d8b8e0aa0568be2700a328e4a2d8999ca59eada8a16a6a1d9e9121e7f42ce9bbe3da3f87221ba67c36056996a687e489f4c6007c
2024-11-29 03:41:48 +00:00
merge-script 031b402b26
Merge rust-bitcoin/rust-bitcoin#3678: Remove unused extern statement
667b7f1010 Remove unused extern statement (yancy)

Pull request description:

  `extern crate` keywords are no longer needed to import a crate as of Rust 2018

ACKs for top commit:
  tcharding:
    ACK 667b7f1010
  apoelstra:
    ACK 667b7f1010bc0745d3e39181e15ec795aeca68dc; successfully ran local tests
  sanket1729:
    ACK 667b7f1010

Tree-SHA512: d157aa881dfce12b65bb676425cb5f17fa5a193d0001f37c26f74cab1254ab08fdcc9b7462b9a74210f85028299af9e14c0071ba390642b59bb7e986ba85933d
2024-11-29 03:01:13 +00:00
merge-script 1f731e9162
Merge rust-bitcoin/rust-bitcoin#3672: units: Remove serde from amounts
77085a1fa1 units: Remove serde from amounts (Tobin C. Harding)

Pull request description:

  The `Amount` and `SignedAmount` were not supposed to implement `serde` traits by design because doing so implicitly uses sats. We provide two modules `as_sat` and `as_btc` to allow users to explicitly serialize in their preferred format.

  In commit: `d57ec019d5 Use Amount type for TxOut value field` derives were added for `serde` and we did not notice it during review.

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

Tree-SHA512: ff4c1f34191e12d955e66737493af4b2dad761fa6f95eb334b86715906e70d2180e7f15d8b4af302d53fb0b1c8b5fb50b4924e9fcdee8824840ba555e73c1c17
2024-11-28 16:32:23 +00:00
merge-script bcc54fb9d0
Merge rust-bitcoin/rust-bitcoin#3670: Remove duplicate test case
60f43a893d Remove duplicate test case (Tobin C. Harding)

Pull request description:

  In commit:

   `a10d5e15b3 Extract the Script assembly creator from fmt::Debug`

  A test case was refactored and where there used to be two test case, one for `Debug` and one for `Display`, two identical test cases were left.

  Remove duplicate test case.

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

Tree-SHA512: 8d21f07b33c9f88ac820422b9f5471bf53e36050a31854a7152ab14c6e25654455f4eb366ea2b497a80f741af36bf068b1df8a69321a0299c9bae60f001b354e
2024-11-28 15:20:24 +00:00
merge-script 88da0674f2
Merge rust-bitcoin/rust-bitcoin#3642: Add p2wpkh address creation example
d9b48cc2ce Add p2wpkh address creation example (yancy)

Pull request description:

  Add example for creating p2wpkh address.  It would be helpful to add examples the other address types (p2tr etc) either in separate files or in one.  Note this should be created in the Address crate however that crate is currently empty.

ACKs for top commit:
  tcharding:
    ACK d9b48cc2ce
  apoelstra:
    ACK d9b48cc2ce68b065640caa22da6fbcb1f3ad85f8; successfully ran local tests

Tree-SHA512: b383c1aca2d3669f66f0dcaf858526793ffc9e62671cf4985c44a11f7717c8e02d359b4d7d8b5822ebdde27595612e10bc831c84a2c4b654f69d4137ad16ba2f
2024-11-28 13:27:47 +00:00
merge-script 4123f2c00f
Merge rust-bitcoin/rust-bitcoin#3663: Fix internal weight calculation
f961f3c0ec Add test (yancy)
3352032892 Fix internal weight calculation (yancy)

Pull request description:

  A fix for 261c8d8ae6.  Maybe it's better to roll back that commit instead.  Clearly there needs to be a test or two added here as well since this change causes not test failures.

ACKs for top commit:
  apoelstra:
    ACK f961f3c0eca4e9b175761756f48699012b63d70a; successfully ran local tests
  sanket1729:
    utACK f961f3c0ec
  tcharding:
    ACK f961f3c0ec

Tree-SHA512: e6bb6d492b6a85f328bdfae6d0e5df9ea48c9c06bd0c310816826c893163bd0a6071af893fa7012fbd4eea0394bc8997277151486807fb8bd06ac78ce8cfc5fd
2024-11-28 12:52:53 +00:00
yancy 667b7f1010 Remove unused extern statement
extern crate keywords are no longer needed to import a crate
2024-11-27 23:06:55 -06:00
merge-script f95d877d56
Merge rust-bitcoin/rust-bitcoin#3660: Update `from_next_work_required` to take an i64 for timespan
4d0d78a3af Fix typo in from_next_work_required documentation (Shing Him Ng)
5e47c4123d Update CompactTarget::from_next_work_required to take timespan as i64 (Shing Him Ng)

Pull request description:

  [In Core](f7144b24be/src/pow.cpp (L56)), the timespan is defined as a signed int64. This PR will update `from_next_work_required` to take in an `i64` instead of a `u64`

  Fixes #3652

ACKs for top commit:
  tcharding:
    ACK 4d0d78a3af
  apoelstra:
    ACK 4d0d78a3af2ca300c6b40348724e806bd51ef27a; successfully ran local tests

Tree-SHA512: eea33ec18b081a97ae2a22c681982ad8693200ff8de3a3fc8f46b84b5e72f41589b79140ddd79ba3fce628f1539baf8387422bcc2c6b409fcadc4c2043aa2901
2024-11-28 03:17:08 +00:00
Tobin C. Harding 22769268f3
units: Close the hex parse errors
As part of the 1.0 effort close the errors in the `units::parse` module.
2024-11-28 13:36:09 +11:00
Tobin C. Harding 77085a1fa1
units: Remove serde from amounts
The `Amount` and `SignedAmount` were not supposed to implement `serde`
traits by design because doing so implicitly uses sats. We provide two
modules `as_sat` and `as_btc` to allow users to explicitly serialize in
their preferred format.

In commit: `d57ec019d5 Use Amount type for TxOut value field` derives
were added for `serde` and we did not notice it during review.
2024-11-28 12:55:43 +11:00
merge-script 3a73a480c8
Merge rust-bitcoin/rust-bitcoin#3643: Account for data pushing opcodes in `is_standard_op_return`
e0442782c8 fix(script): account for data pushing opcodes in `is_standard_op_return` (Rob N)

Pull request description:

  While I believe the original commit used 80 bytes for the entire script as the limit, Bitcoin Core as of [this commit](1101837461/src/policy/policy.h (L68-L72)) will relay OP_RETURN outputs as long as the data itself is not above 80 bytes, meaning a script of maximum size 83 bytes should be standard.

ACKs for top commit:
  tcharding:
    ACK e0442782c8
  apoelstra:
    ACK e0442782c8c04bdc48c2743e70f46e41c507e5f4; successfully ran local tests

Tree-SHA512: edd627806c9b5c85050594d45fde49ce3945b9358ae67b4bd0e22f7feb855fe5f4d90f1770870716decbc70aa1a3e0758902c74e3c010977731b823fd72ec23b
2024-11-28 01:14:26 +00:00
Tobin C. Harding 60f43a893d
Remove duplicate test case
In commit:

 `a10d5e15b3 Extract the Script assembly creator from fmt::Debug`

A test case was refactored and where there used to be two test case, one
for `Debug` and one for `Display`, two identical test cases were left.

Remove duplicate test case.
2024-11-28 11:50:42 +11:00
merge-script a22dfc2897
Merge rust-bitcoin/rust-bitcoin#3667: Fix psbt fuzz crash
9aebb96fb9 Fix psbt fuzz crash (Sanket Kanjalkar)

Pull request description:

  Fixes: https://github.com/rust-bitcoin/rust-bitcoin/issues/3628

  This occurs when combining two PSBTs with different xpub key sources. Added a length check before indexing into slices to prevent out-of-bounds access.

  For some reason, the precommit hook complained about non-ascii files. I don't think any of the names here are non-ascii

ACKs for top commit:
  apoelstra:
    ACK 9aebb96fb99e8e9e019663659c6eff851a62f2ce; successfully ran local tests; thanks!
  tcharding:
    ACK 9aebb96fb9

Tree-SHA512: b61274c594bc1f2ea4d04c8a7ace673a7632bb9ea31f59b56779a008c35e61281ea4f6b869990d886779e3e556932a3b2e8b015733ef18e236f12ca77e211c26
2024-11-28 00:00:12 +00:00
yancy d9b48cc2ce Add p2wpkh address creation example 2024-11-27 15:09:14 -06:00
Rob N e0442782c8
fix(script): account for data pushing opcodes in `is_standard_op_return`
While I believe the original commit used 80 bytes for the entire script as the limit,
Bitcoin Core as of [this commit](7a172c76d2/src/policy/policy.h)
will relay OP_RETURN outputs as long as the data itself is not above 80 bytes, meaning a script of maximum size 83 bytes should be standard.
2024-11-27 07:28:23 -10:00
Shing Him Ng 4d0d78a3af Fix typo in from_next_work_required documentation 2024-11-27 11:27:26 -06:00
Shing Him Ng 5e47c4123d Update CompactTarget::from_next_work_required to take timespan as i64
Bitcoin Core's consensus rules allow this timespan interval to be
negative. This commit also updates Params::pow_target_timespan to be a
u32. This field is almost compared to u64 and i64s, so changing this to
a u32 will allow users to use `.into()` for converstions
2024-11-27 11:27:22 -06:00