Skip to content

Commit fa625b0

Browse files
committed
Merge #9333: Document CWalletTx::mapValue entries and remove erase of nonexistent "version" entry.
87ed396 [trivial] Add comment documenting bumpfee mapValues (Russell Yanofsky) a1fe944 Remove reference to nonexistent "version" wallet transaction mapvalue field (Russell Yanofsky) 654e044 [trivial] Add comment documenting CWalletTx::mapValue (Russell Yanofsky) Tree-SHA512: 1fd1860e345c59b13634db2007fff4ba30aaf1f177fdd765f47bf9257fac117cdcd5d491424416da304c08e85effbb27f3424f072f7c9587ef39cb98531b932a
2 parents d32581c + 87ed396 commit fa625b0

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/wallet/wallet.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,31 @@ class CWalletTx : public CMerkleTx
256256
const CWallet* pwallet;
257257

258258
public:
259+
/**
260+
* Key/value map with information about the transaction.
261+
*
262+
* The following keys can be read and written through the map and are
263+
* serialized in the wallet database:
264+
*
265+
* "comment", "to" - comment strings provided to sendtoaddress,
266+
* sendfrom, sendmany wallet RPCs
267+
* "replaces_txid" - txid (as HexStr) of transaction replaced by
268+
* bumpfee on transaction created by bumpfee
269+
* "replaced_by_txid" - txid (as HexStr) of transaction created by
270+
* bumpfee on transaction replaced by bumpfee
271+
* "from", "message" - obsolete fields that could be set in UI prior to
272+
* 2011 (removed in commit 4d9b223)
273+
*
274+
* The following keys are serialized in the wallet database, but shouldn't
275+
* be read or written through the map (they will be temporarily added and
276+
* removed from the map during serialization):
277+
*
278+
* "fromaccount" - serialized strFromAccount value
279+
* "n" - serialized nOrderPos value
280+
* "timesmart" - serialized nTimeSmart value
281+
* "spent" - serialized vfSpent value that existed prior to
282+
* 2014 (removed in commit 93a18a3)
283+
*/
259284
mapValue_t mapValue;
260285
std::vector<std::pair<std::string, std::string> > vOrderForm;
261286
unsigned int fTimeReceivedIsTxTime;
@@ -369,7 +394,6 @@ class CWalletTx : public CMerkleTx
369394
}
370395

371396
mapValue.erase("fromaccount");
372-
mapValue.erase("version");
373397
mapValue.erase("spent");
374398
mapValue.erase("n");
375399
mapValue.erase("timesmart");

0 commit comments

Comments
 (0)