Skip to content

Commit 0194fb0

Browse files
committed
Fix Transaction::is_fee
Make conform with Elements Core: ```c++ bool IsFee() const { return g_con_elementsmode && scriptPubKey == CScript() && nValue.IsExplicit() && nAsset.IsExplicit(); } ```
1 parent 4fb43b4 commit 0194fb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl TxOut {
462462

463463
/// Whether or not this output is a fee output
464464
pub fn is_fee(&self) -> bool {
465-
self.script_pubkey.is_empty()
465+
self.script_pubkey.is_empty() && self.value.is_explicit() && self.asset.is_explicit()
466466
}
467467

468468
/// Extracts the minimum value from the rangeproof, if there is one, or returns 0.

0 commit comments

Comments
 (0)