Skip to content

Commit 1325e25

Browse files
committed
two clarifying doc-comments
1 parent 739a708 commit 1325e25

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

zingolib/src/wallet/transaction_context.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ pub mod decrypt_transaction {
8888
// Collect our t-addresses for easy checking
8989
let taddrs_set = self.key.get_all_taddrs(&self.config);
9090
// Process t-address outputs
91-
// If this transaction in outgoing, i.e., we received sent some money in this transaction, then we need to grab all transparent outputs
92-
// that don't belong to us as the outgoing metadata
93-
// the assumption is either we already decrypted a compact output and filled in some data
94-
// or transparent something
95-
96-
// in the send case, we already know the transaction is outgoing. however, this if clause will not trigger.
91+
// If the there's funding known to be input to this transaction by this Capability
92+
// then it's known to be Outgoing. It may still be outgoing but those funds may not be known
93+
// at this point.
9794
if self
9895
.transaction_metadata_set
9996
.read()

zingolib/src/wallet/transaction_records_by_id.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ impl TransactionRecordsById {
277277
.sum();
278278
Ok(query_record.total_transparent_value_spent + sapling_spend_value + orchard_spend_value)
279279
}
280+
// The value that's output, but *NOT* to an explicit receiver (unless this is running on the winning validator!)
281+
// is the fee.
280282
fn total_value_output_to_explicit_receivers(&self, query_record: &TransactionRecord) -> u64 {
281283
let transparent_output_value: u64 = query_record
282284
.transparent_outputs()

0 commit comments

Comments
 (0)