There are two limits that the Bitcoin network enforces in regard to hashing scripts - For P2SH the redeem script must be less than 520 bytes - For P2WSH the witness script must be less than 10,000 bytes Currently we are only enforcing the p2sh limit when creating an address with `Address::p2sh`. There are various ways to create addresses from script hashes and if users manually hash a script then use the `ScriptHash` (or `WScritpHash`) our APIs assume the script that was hashed is valid. This means there is the potential for users to get burned by creating addresses that cannot be spent, something we would like to avoid. - Add fallible constructors to `ScriptHash` and `WScriptHash` - Add `TryFrom` impls as well to both types - Remove the `From` impls |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml | ||
build.rs |