Skip to content

Commit

Permalink
two clarifying doc-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Jun 1, 2024
1 parent 739a708 commit 1325e25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 3 additions & 6 deletions zingolib/src/wallet/transaction_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,9 @@ pub mod decrypt_transaction {
// Collect our t-addresses for easy checking
let taddrs_set = self.key.get_all_taddrs(&self.config);
// Process t-address outputs
// If this transaction in outgoing, i.e., we received sent some money in this transaction, then we need to grab all transparent outputs
// that don't belong to us as the outgoing metadata
// the assumption is either we already decrypted a compact output and filled in some data
// or transparent something

// in the send case, we already know the transaction is outgoing. however, this if clause will not trigger.
// If the there's funding known to be input to this transaction by this Capability
// then it's known to be Outgoing. It may still be outgoing but those funds may not be known
// at this point.
if self
.transaction_metadata_set
.read()
Expand Down
2 changes: 2 additions & 0 deletions zingolib/src/wallet/transaction_records_by_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ impl TransactionRecordsById {
.sum();
Ok(query_record.total_transparent_value_spent + sapling_spend_value + orchard_spend_value)
}
// The value that's output, but *NOT* to an explicit receiver (unless this is running on the winning validator!)
// is the fee.
fn total_value_output_to_explicit_receivers(&self, query_record: &TransactionRecord) -> u64 {
let transparent_output_value: u64 = query_record
.transparent_outputs()
Expand Down

0 comments on commit 1325e25

Please sign in to comment.