You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #279: Improve slicing and error handling around slices
5e0d577 pset: fix slicing in KeySource::deserialize (Andrew Poelstra)
4384012 address: do a better job slicing bech32 data (Andrew Poelstra)
cae359d transaction: use better error typing for pegin destructuring (Andrew Poelstra)
6809a7f blind: use array splitting in TxOut::unblind (fix potential DoS?) (Andrew Poelstra)
ee50a5f rewrite Address::from_base58 to eliminate all the unwraps (Andrew Poelstra)
ed024b2 add bitcoin-internals dependency (Andrew Poelstra)
Pull request description:
Uses the `bitcoin-internals` library which provides us a bunch of array/slice methods that aren't available in std in our MSRV. Eventually we will be able to drop the dep and get these features directly from std.
This replaces a bunch of slice accesses with arrays, cleaning up error paths and eliminating panics (though most are inaccessible assuming you use known-valid data from the blockchain).
Builds on #278 (which I will merge in the next hour).
Will do a followup that cleans up the error types; I deliberately avoided breaking the API to make this one easy to backport.
ACKs for top commit:
apoelstra:
ACK 5e0d577; successfully ran local tests
philipr-za:
ACK 5e0d577
Tree-SHA512: b9238a0a2c642061c47671b955eb19771485448f8b455be268f2a5ee223f29f0ef09f67f792fcf9400481826c5a9c5ec2d0ee6eceb2a3da458819178f5f54d37
0 commit comments