]> Untitled Git - bdk/commit
[examples] Fix Miniscript variants issue in compiler example
authorDominik Spicher <dominik.spicher@inacta.ch>
Fri, 7 Aug 2020 14:08:23 +0000 (16:08 +0200)
committerDominik Spicher <dominik.spicher@inacta.ch>
Fri, 7 Aug 2020 14:08:23 +0000 (16:08 +0200)
commit462d413b02ec05b401d25dd7acb3237fcb522b4a
treea4a2fbacffe11e85c3e6d7aeabc244cf90ddee29
parenta581457ba8e27d889d7cc30470ab2d266b1abb20
[examples] Fix Miniscript variants issue in compiler example

miniscript has extended the `Miniscript` struct to be generic
over a `ScriptContext`. This context is different for the `Sh`
variant (`Legacy`) than for the `Wsh` and `ShWsh` variants
(`Segwitv0`). Therefore, Rust is not happy with the single
`compiled` variable if it is used as an argument for all three
variants.
examples/compiler.rs