mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Add isMine method. Add error logs
This commit is contained in:
parent
34c4eefb59
commit
47572888e7
@ -357,12 +357,13 @@ public abstract class WalletService {
|
||||
txIn.setScriptSig(ScriptBuilder.createEmpty());
|
||||
txIn.setWitness(TransactionWitness.redeemP2WPKH(txSig, key));
|
||||
} catch (ECKey.KeyIsEncryptedException e1) {
|
||||
log.error(e1.toString());
|
||||
throw e1;
|
||||
} catch (ECKey.MissingPrivateKeyException e1) {
|
||||
log.warn("No private key in keypair for input {}", index);
|
||||
}
|
||||
} else {
|
||||
// log.error("Unexpected script type.");
|
||||
log.error("Unexpected script type.");
|
||||
throw new RuntimeException("Unexpected script type.");
|
||||
}
|
||||
} else {
|
||||
@ -546,6 +547,10 @@ public abstract class WalletService {
|
||||
return getNumTxOutputsForAddress(address) == 0;
|
||||
}
|
||||
|
||||
public boolean isMine(TransactionOutput transactionOutput) {
|
||||
return transactionOutput.isMine(wallet);
|
||||
}
|
||||
|
||||
// BISQ issue #4039: Prevent dust outputs from being created.
|
||||
// Check the outputs of a proposed transaction. If any are below the dust threshold,
|
||||
// add up the dust, log the details, and return the cumulative dust amount.
|
||||
|
Loading…
Reference in New Issue
Block a user