mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 14:13:52 +02:00
fed3cf6f0ewallet: Replace CWalletTx's vOrderForm with specific fields (Ava Chow)4f8823e8e1wallet: Drop vOrderForm from CommitTransaction (Ava Chow)a2b0bfcd85wallet: Drop mapValue from CWalletTx (Ava Chow)cb99864c91wallet: Throw if unknown entry is found in mapValue (Ava Chow)98d5cdae66wallet: Make CWalletTx "replaces_txid" and "replaced_by_txid" member variables (Ava Chow)7ef8a6efc2wallet: Make CWalletTx "comment" and "to" member variables (Ava Chow)2155e913d3wallet: Make CWalletTx "from" and "message" member variables (Ava Chow)c6ba98dcc8wallet: Drop mapValue from CommitTransaction (Ava Chow)00abb174a8wallet: Pass comment and comment_to to CommitTransaction (Ava Chow)1a219a37a2wallet: Pass replaces_txid to CommitTransaction outside of mapValue (Ava Chow) Pull request description: `mapValue` and `vOrderForm` are opaque data structures that contain transaction metadata. It is hard to determine what actual data each field contains, and they can ostensibly be misused where metadata is added in the future without developers realizing that such metadata exists. It's much clearer to have all of that metadata live in their own explicit member variables within `CWalletTx`. This PR implements that change. Since the serialization format of `CWalletTx` depends on `mapValue` and `vOrderForm`, the serialization remains unchanged, so when serializing these new members, they need to be shoved/extracted from a temporary `mapValue` or `vOrderForm`. This does end up breaking forwards compatibility as unknown fields in `mapValue` and `vOrderForm` are stripped out if the record is rewritten. However, I don't expect that we would continue to use these fields for future metadata, so I think that risk is low. ACKs for top commit: ajtowns: reACKfed3cf6f0ew0xlt: ACKfed3cf6f0ewith above nits/caveats. Eunovo: ACKfed3cf6f0eTree-SHA512: c7deab5aaeac13656012f8b13c0161fd420d2a5348eebd7649310e78ccb1216995aa6a7cbd506ac8d11d7b46b0856d6e6a897bc39965b51cfcf2268356ace261