Replace UTXO::is_internal with script_type

This means less conversion and logic mapping from bool to ScriptType and
back again.
This commit is contained in:
LLFourn
2020-12-04 10:37:58 +11:00
parent a89dd85833
commit 8dcb75dfa4
10 changed files with 54 additions and 75 deletions

View File

@@ -43,10 +43,6 @@ impl ScriptType {
ScriptType::Internal => b'i',
}
}
pub fn is_internal(&self) -> bool {
self == &ScriptType::Internal
}
}
impl AsRef<[u8]> for ScriptType {
@@ -96,7 +92,7 @@ impl std::default::Default for FeeRate {
pub struct UTXO {
pub outpoint: OutPoint,
pub txout: TxOut,
pub is_internal: bool,
pub script_type: ScriptType,
}
/// A wallet transaction