[wallet] Allow limiting the use of internal utxos in TxBuilder

This commit is contained in:
Alekos Filini
2020-08-07 19:40:13 +02:00
parent 85090a28eb
commit 8d9ccf8d0b
8 changed files with 298 additions and 370 deletions

View File

@@ -19,6 +19,10 @@ impl ScriptType {
ScriptType::Internal => 'i' as u8,
}
}
pub fn is_internal(&self) -> bool {
self == &ScriptType::Internal
}
}
impl AsRef<[u8]> for ScriptType {
@@ -34,6 +38,7 @@ impl AsRef<[u8]> for ScriptType {
pub struct UTXO {
pub outpoint: OutPoint,
pub txout: TxOut,
pub is_internal: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default)]