]> Untitled Git - bdk/commitdiff
Additional comments for `TransactionDetails`.
author志宇 <hello@evanlinjin.me>
Wed, 15 Jun 2022 14:13:41 +0000 (22:13 +0800)
committer志宇 <hello@evanlinjin.me>
Wed, 29 Jun 2022 11:38:12 +0000 (19:38 +0800)
Describe how fields `received` and `sent` are calculated for
`TransactionDetails`.

src/types.rs

index fc81bc27890dd0d11047549dbaaf28c99dc1bd0c..1c376bb57c13c5c363228df7b7d919563a3c4378 100644 (file)
@@ -202,8 +202,10 @@ pub struct TransactionDetails {
     pub txid: Txid,
 
     /// Received value (sats)
+    /// Sum of owned outputs of this transaction.
     pub received: u64,
     /// Sent value (sats)
+    /// Sum of owned inputs of this transaction.
     pub sent: u64,
     /// Fee value (sats) if available.
     /// The availability of the fee depends on the backend. It's never `None` with an Electrum