mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge #669: Disallow issuance-stuffing in tx deserialization
8a3d622 Disallow issuance-stuffing in tx deserialization (Gregory Sanders)
Pull request description:
This is not a consensus change, as "honest" serialization for size/txid purposes will not include these, and only the amounts fields are used in "balance" checking later.
Tree-SHA512: b50e42c002cf0fc8619e2a946ece34ce69133a2a196397d578ca70425f068dc74a4754b5064ee5df67df0faf898da997caeb53f15ff04904b7e6d7361d01a57f
This commit is contained in:
commit
9bc016f460
1 changed files with 3 additions and 0 deletions
|
|
@ -212,6 +212,9 @@ public:
|
|||
// The asset fields are deserialized only if they are present.
|
||||
if (fHasAssetIssuance) {
|
||||
READWRITE(assetIssuance);
|
||||
if (assetIssuance.IsNull()) {
|
||||
throw std::ios_base::failure("Superfluous issuance record");
|
||||
}
|
||||
} else if (ser_action.ForRead()) {
|
||||
assetIssuance.SetNull();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue