]> Untitled Git - bdk/commit
[policy] Remove the `TooManyItemsSelected` error
authorAlekos Filini <alekos.filini@gmail.com>
Sat, 13 Feb 2021 15:58:26 +0000 (10:58 -0500)
committerAlekos Filini <alekos.filini@gmail.com>
Sat, 13 Feb 2021 16:10:31 +0000 (11:10 -0500)
commitfa2610538f9fd964f57afe000af0264b40c7b2e8
tree35134762a08a90625fdbafaaea02346414ae635e
parentd0ffcdd009199f39714f3b329ce7b6741923e7a8
[policy] Remove the `TooManyItemsSelected` error

The `TooManyItemsSelected` error has been removed, since it's not technically an
error but potentailly more of an "over-constraint" over a tx: for instance,
given a `thresh(3,pk(a),pk(b),older(10),older(20))` descriptor one could create
a spending tx with the `[0,1,2]` items that would only be spendable after `10`
blocks, or a tx with the `[0,2,3]` items that would be spendable after `20`.

In this case specifying more items than the threshold would create a tx with
the maximum constraint possible, in this case the `20` blocks. This is not
necessarily an error, so we should allow it without failing.
CHANGELOG.md
src/descriptor/policy.rs