mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
primitives: do not de/serialize asset issuance in bitcoin mode
Fixes a fuzztest failure related to `g_con_elementsmode`.
This commit is contained in:
parent
9c1de4d85f
commit
f2a0050f31
1 changed files with 2 additions and 2 deletions
|
|
@ -146,7 +146,7 @@ public:
|
||||||
inline void Serialize(Stream& s) const {
|
inline void Serialize(Stream& s) const {
|
||||||
bool fHasAssetIssuance;
|
bool fHasAssetIssuance;
|
||||||
COutPoint outpoint;
|
COutPoint outpoint;
|
||||||
if (prevout.n == (uint32_t) -1) {
|
if (!g_con_elementsmode || prevout.n == (uint32_t) -1) {
|
||||||
// Coinbase inputs do not have asset issuances attached
|
// Coinbase inputs do not have asset issuances attached
|
||||||
// to them.
|
// to them.
|
||||||
fHasAssetIssuance = false;
|
fHasAssetIssuance = false;
|
||||||
|
|
@ -189,7 +189,7 @@ public:
|
||||||
COutPoint outpoint;
|
COutPoint outpoint;
|
||||||
s >> outpoint;
|
s >> outpoint;
|
||||||
|
|
||||||
if (outpoint.n == (uint32_t) -1) {
|
if (!g_con_elementsmode || outpoint.n == (uint32_t) -1) {
|
||||||
// No asset issuance for Coinbase inputs.
|
// No asset issuance for Coinbase inputs.
|
||||||
fHasAssetIssuance = false;
|
fHasAssetIssuance = false;
|
||||||
prevout = outpoint;
|
prevout = outpoint;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue