Skip to content

Commit 654e044

Browse files
committed
[trivial] Add comment documenting CWalletTx::mapValue
1 parent 76fcd9d commit 654e044

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/wallet/wallet.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,31 @@ class CWalletTx : public CMerkleTx
248248
const CWallet* pwallet;
249249

250250
public:
251+
/**
252+
* Key/value map with information about the transaction.
253+
*
254+
* The following keys can be read and written through the map and are
255+
* serialized in the wallet database:
256+
*
257+
* "comment", "to" - comment strings provided to sendtoaddress,
258+
* sendfrom, sendmany wallet RPCs
259+
* "from", "message" - obsolete fields that could be set in UI prior to
260+
* 2011 (removed in commit 4d9b223)
261+
*
262+
* The following keys are serialized in the wallet database, but shouldn't
263+
* be read or written through the map (they will be temporarily added and
264+
* removed from the map during serialization):
265+
*
266+
* "fromaccount" - serialized strFromAccount value
267+
* "n" - serialized nOrderPos value
268+
* "timesmart" - serialized nTimeSmart value
269+
* "spent" - serialized vfSpent value that existed prior to
270+
* 2014 (removed in commit 93a18a3)
271+
*
272+
* A mapValue.erase("version") statement also appears in the code,
273+
* originating from commit 865c3a2 in 2010, but it does not appear that any
274+
* "version" entries were actually ever created by any version of bitcoin.
275+
*/
251276
mapValue_t mapValue;
252277
std::vector<std::pair<std::string, std::string> > vOrderForm;
253278
unsigned int fTimeReceivedIsTxTime;

0 commit comments

Comments
 (0)