commands: check for dust outputs in the PSBT sanity checks
This commit is contained in:
parent
9f23161a53
commit
f2312593da
@ -162,6 +162,13 @@ fn sanity_check_psbt(psbt: &Psbt) -> Result<(), CommandError> {
|
||||
return Err(CommandError::SanityCheckFailure(psbt.clone()));
|
||||
}
|
||||
|
||||
// Check for dust outputs
|
||||
for txo in psbt.unsigned_tx.output.iter() {
|
||||
if txo.value < txo.script_pubkey.dust_value().to_sat() {
|
||||
return Err(CommandError::SanityCheckFailure(psbt.clone()));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user