Skip to content

Commit

Permalink
[trivial] Add comment documenting CWalletTx::mapValue
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanofsky committed Dec 12, 2016
1 parent 76fcd9d commit 654e044
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,31 @@ class CWalletTx : public CMerkleTx
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<std::pair<std::string, std::string> > vOrderForm;
unsigned int fTimeReceivedIsTxTime;
Expand Down

0 comments on commit 654e044

Please sign in to comment.