From 77c7d0aae944dbd5a44ca9b8f239db0c9edcd4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Wed, 15 Jun 2022 22:13:41 +0800 Subject: [PATCH] Additional comments for `TransactionDetails`. Describe how fields `received` and `sent` are calculated for `TransactionDetails`. --- src/types.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types.rs b/src/types.rs index fc81bc27..1c376bb5 100644 --- a/src/types.rs +++ b/src/types.rs @@ -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