Skip to content

Commit

Permalink
[Validation] Don't reject sapling txes with P2CS outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Nov 16, 2020
1 parent 226aaaa commit 7440709
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sapling/sapling_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ bool CheckTransaction(const CTransaction& tx, CValidationState& state, CAmount&

// From here, all of the checks are done in +v2 transactions.

// if the tx has shielded data, cannot be a coinstake, coinbase, zcspend, p2csOut and zcmint
if (tx.IsCoinStake() || tx.IsCoinBase() || tx.HasZerocoinSpendInputs() || tx.HasP2CSOutputs() ||
tx.HasZerocoinMintOutputs())
// if the tx has shielded data, cannot be a coinstake, coinbase, zcspend and zcmint
if (tx.IsCoinStake() || tx.IsCoinBase() || tx.HasZerocoinSpendInputs() || tx.HasZerocoinMintOutputs())
return state.DoS(100, error("%s: Sapling version with invalid data", __func__),
REJECT_INVALID, "bad-txns-invalid-sapling");

Expand Down

0 comments on commit 7440709

Please sign in to comment.