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
// FIXME state is meaningless without CMR; should we warn here
101
+
// FIXME also should we warn if you don't provide a CMR? seems like if you're calling `simplicity pset update-input`
102
+
// you probably have a simplicity program right? maybe we should even provide a --no-cmr flag
103
+
let state = state
104
+
.map(<[u8;32]>::from_hex)
105
+
.transpose()
106
+
.result_context("parsing 32-byte state commitment as hex")?;
107
+
90
108
letmut updated_values = vec![];
91
109
ifletSome(internal_key) = internal_key {
92
110
updated_values.push("tap_internal_key");
@@ -97,7 +115,7 @@ fn exec_inner(
97
115
// Guess that the given program is the only Tapleaf. This is the case for addresses
98
116
// generated from the web IDE, and from `hal-simplicity simplicity info`, and for
99
117
// most "test" scenarios. We need to design an API to handle more general cases.
100
-
let spend_info = taproot_spend_info(internal_key,None, cmr);
118
+
let spend_info = taproot_spend_info(internal_key,state, cmr);
101
119
if spend_info.output_key().as_inner().serialize() != input_utxo.script_pubkey[2..]{
102
120
// If our guess was wrong, at least error out..
103
121
returnErr(format!("CMR and internal key imply output key {}, which does not match input scriptPubKey {}", spend_info.output_key().as_inner(), input_utxo.script_pubkey))
0 commit comments