Remove debug output
This commit is contained in:
parent
20e0a4d421
commit
5d190aa87d
@ -248,8 +248,6 @@ impl Signer for PrivateKey {
|
|||||||
return Err(SignerError::InputIndexOutOfRange);
|
return Err(SignerError::InputIndexOutOfRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Partial sigs: {:?}", psbt.inputs[input_index].partial_sigs);
|
|
||||||
|
|
||||||
let pubkey = self.public_key(&secp);
|
let pubkey = self.public_key(&secp);
|
||||||
if psbt.inputs[input_index].partial_sigs.contains_key(&pubkey) {
|
if psbt.inputs[input_index].partial_sigs.contains_key(&pubkey) {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
@ -341,7 +339,7 @@ impl From<KeyMap> for SignersContainer {
|
|||||||
let mut container = SignersContainer::new();
|
let mut container = SignersContainer::new();
|
||||||
|
|
||||||
for (_, secret) in keymap {
|
for (_, secret) in keymap {
|
||||||
let previous = match secret {
|
match secret {
|
||||||
DescriptorSecretKey::SinglePriv(private_key) => container.add_external(
|
DescriptorSecretKey::SinglePriv(private_key) => container.add_external(
|
||||||
SignerId::from(
|
SignerId::from(
|
||||||
private_key
|
private_key
|
||||||
@ -358,10 +356,6 @@ impl From<KeyMap> for SignersContainer {
|
|||||||
Arc::new(xprv),
|
Arc::new(xprv),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(previous) = previous {
|
|
||||||
println!("This signer was replaced: {:?}", previous)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
container
|
container
|
||||||
@ -375,20 +369,14 @@ impl SignersContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adds an external signer to the container for the specified id. Optionally returns the
|
/// Adds an external signer to the container for the specified id. Optionally returns the
|
||||||
/// signer that was previosuly in the container, if any
|
/// signer that was previously in the container, if any
|
||||||
pub fn add_external(
|
pub fn add_external(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: SignerId,
|
id: SignerId,
|
||||||
ordering: SignerOrdering,
|
ordering: SignerOrdering,
|
||||||
signer: Arc<dyn Signer>,
|
signer: Arc<dyn Signer>,
|
||||||
) -> Option<Arc<dyn Signer>> {
|
) -> Option<Arc<dyn Signer>> {
|
||||||
|
self.0.insert((id, ordering).into(), signer)
|
||||||
println!("Adding external signer ID = {:?}", id);
|
|
||||||
let key = (id, ordering).into();
|
|
||||||
println!("With a key: {:?}", key);
|
|
||||||
let res = self.0.insert(key, signer);
|
|
||||||
println!("After insertion, len = {}", self.0.values().len());
|
|
||||||
res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes a signer from the container and returns it
|
/// Removes a signer from the container and returns it
|
||||||
@ -408,7 +396,6 @@ impl SignersContainer {
|
|||||||
pub fn signers(&self) -> Vec<&Arc<dyn Signer>> {
|
pub fn signers(&self) -> Vec<&Arc<dyn Signer>> {
|
||||||
let mut items = self.0.iter().collect::<Vec<_>>();
|
let mut items = self.0.iter().collect::<Vec<_>>();
|
||||||
items.sort_by(|(a, _), (b, _)| (*a).cmp(*b));
|
items.sort_by(|(a, _), (b, _)| (*a).cmp(*b));
|
||||||
|
|
||||||
items.into_iter().map(|(_, v)| v).collect()
|
items.into_iter().map(|(_, v)| v).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user