From 654e0443fb240ca403ee2fc8cbccf3c74d53ef77 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 12 Dec 2016 11:40:00 -0500 Subject: [PATCH 1/3] [trivial] Add comment documenting CWalletTx::mapValue --- src/wallet/wallet.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index f7103b6a8..36f7cd47b 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -248,6 +248,31 @@ private: const CWallet* pwallet; public: + /** + * Key/value map with information about the transaction. + * + * The following keys can be read and written through the map and are + * serialized in the wallet database: + * + * "comment", "to" - comment strings provided to sendtoaddress, + * sendfrom, sendmany wallet RPCs + * "from", "message" - obsolete fields that could be set in UI prior to + * 2011 (removed in commit 4d9b223) + * + * The following keys are serialized in the wallet database, but shouldn't + * be read or written through the map (they will be temporarily added and + * removed from the map during serialization): + * + * "fromaccount" - serialized strFromAccount value + * "n" - serialized nOrderPos value + * "timesmart" - serialized nTimeSmart value + * "spent" - serialized vfSpent value that existed prior to + * 2014 (removed in commit 93a18a3) + * + * A mapValue.erase("version") statement also appears in the code, + * originating from commit 865c3a2 in 2010, but it does not appear that any + * "version" entries were actually ever created by any version of bitcoin. + */ mapValue_t mapValue; std::vector > vOrderForm; unsigned int fTimeReceivedIsTxTime; From a1fe9446e9df87e7c2c344d31c5b7b60275127fb Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 14 Dec 2016 05:41:36 -0500 Subject: [PATCH 2/3] Remove reference to nonexistent "version" wallet transaction mapvalue field This change removes a mapValue.erase("version") statement which deletes a mapValue entry that never existed. The statement was mistakenly added in commit 865c3a23832e36d50cb873d38c976032b027b5d3 in 2010 and is harmless but confusing. --- src/wallet/wallet.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 36f7cd47b..755c1a870 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -268,10 +268,6 @@ public: * "timesmart" - serialized nTimeSmart value * "spent" - serialized vfSpent value that existed prior to * 2014 (removed in commit 93a18a3) - * - * A mapValue.erase("version") statement also appears in the code, - * originating from commit 865c3a2 in 2010, but it does not appear that any - * "version" entries were actually ever created by any version of bitcoin. */ mapValue_t mapValue; std::vector > vOrderForm; @@ -381,7 +377,6 @@ public: } mapValue.erase("fromaccount"); - mapValue.erase("version"); mapValue.erase("spent"); mapValue.erase("n"); mapValue.erase("timesmart"); From 87ed396159974b403d0ac00cb793888174e2665c Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 25 Jan 2017 13:13:56 -0500 Subject: [PATCH 3/3] [trivial] Add comment documenting bumpfee mapValues --- src/wallet/wallet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 755c1a870..4bfa8ec33 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -256,6 +256,10 @@ public: * * "comment", "to" - comment strings provided to sendtoaddress, * sendfrom, sendmany wallet RPCs + * "replaces_txid" - txid (as HexStr) of transaction replaced by + * bumpfee on transaction created by bumpfee + * "replaced_by_txid" - txid (as HexStr) of transaction created by + * bumpfee on transaction replaced by bumpfee * "from", "message" - obsolete fields that could be set in UI prior to * 2011 (removed in commit 4d9b223) *