[descriptor] Make the syntax of descriptor!() more consistent

The syntax now is pretty much the same as the normal descriptor syntax,
with the only difference that modifiers cannot be grouped together (i.e.
`sdv:older(144)` must be turned into `s:d:v:older(144)`.
This commit is contained in:
Alekos Filini
2020-12-16 16:10:22 +01:00
parent 931a110e4e
commit 7e90657ee1
4 changed files with 283 additions and 115 deletions

View File

@@ -557,7 +557,7 @@ mod signers_container_tests {
fn signers_with_same_ordering() {
let (prvkey1, _, _) = setup_keys(TPRV0_STR);
let (prvkey2, _, _) = setup_keys(TPRV1_STR);
let desc = descriptor!(sh(multi 2, prvkey1, prvkey2)).unwrap();
let desc = descriptor!(sh(multi(2, prvkey1, prvkey2))).unwrap();
let (_, keymap) = desc.to_wallet_descriptor(Network::Testnet).unwrap();
let signers = SignersContainer::from(keymap);