Make change_descriptor explicitly optional for non-multipath descriptors.
Add a receive-only document vector with no change descriptor or optional
metadata; the existing vectors cover a receive/change pair and multipath.
create_outputs and scanning declare expected with a default of None but
dereference it unconditionally (expected.get(...)), so calling either
without it raises AttributeError, although the parameter is documented
optional. Guard the expected-value checks with `if expected is not None:`.
The self-test, which always passes expected, is unaffected.
* bip-89, bip-114, bip-441: add missing <references/> tag
These three BIPs use <ref> footnotes but never place a <references/>
tag, so GitHub's mediawiki renderer drops the footnote text entirely and
the [n] superscripts link to anchors that do not exist.
Add a Footnotes section as well, so the notes are rendered.
---------
Co-authored-by: Kanan M <kanan@MacBook-Pro-Sanan.local>
- Specification was a level-3 heading and therefore rendered as a
subsection of Motivation; Backward Compatibility, Implementation and
Related Work were one level too deep as well.
- Drop the stray '<' in front of the testnet address tb1pfees9rn5nz.
- 'typea' -> 'type', 'ineherent' -> 'inherent'.
- Add the Copyright section required by BIP 3, matching the
BSD-3-Clause License header.
Line 57 uses a closing </pre> where the opening tag was intended, so
the example TxDP that follows (up to the real </pre> on line 90) is
rendered as prose instead of a preformatted block.
The self-test reads time.clock_gettime_ns(time.CLOCK_MONOTONIC) for
extra_in on even iterations. CPython documents both symbols
"Availability: Unix", so the attribute lookup raises AttributeError on
Windows and python3 reference.py does not run there.
Take extra_in from secrets instead, at a random length, so the self-test
also exercises extra_in of varying length. time has no other use in the
file, so its import goes too.
The control block length rule in Script Validation caps m at 128, but
compute_merkle_root and compute_control_block applied no depth bound, so a
129-deep tree produced a 4129-byte control block for an output consensus
must reject as unspendable.
Structural validation also used assert, which python -O strips: a malformed
3-child branch silently returned the root of its first two leaves rather
than raising, dropping a script leaf from the commitment.
Adds negative_structure_tests covering both, run from BIP360_tests.