add test to determine if wallet can sign all psbt inputs

This commit is contained in:
Craig Raw 2024-04-12 09:11:16 +02:00
parent b128bb895d
commit 42de57026c

View file

@ -1461,6 +1461,10 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
return isValid() && !getSigningNodes(psbt).isEmpty();
}
public boolean canSignAllInputs(PSBT psbt) {
return isValid() && getSigningNodes(psbt).size() == psbt.getPsbtInputs().size();
}
/**
* Determines which nodes in this wallet can sign which inputs in the provided PSBT
*