Skip to content

Commit

Permalink
mixpool: Remove ban for invalid UTXO check
Browse files Browse the repository at this point in the history
None of the existing UTXO checks result in an automatic ban, so avoid this
behavior for an invalid signature proof as well.
  • Loading branch information
jrick committed Jun 3, 2024
1 parent 2796b22 commit 23ab8a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions mixing/mixpool/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ var (
// that exceeds the total input value.
ErrInvalidTotalMixAmount = newBannableError("invalid total mix amount")

// ErrInvalidUTXOProof is returned by AcceptMessage if a pair request
// fails to prove ownership of each utxo.
ErrInvalidUTXOProof = newBannableError("invalid UTXO ownership proof")

// ErrMissingUTXOs is returned by AcceptMessage if a pair request
// message does not reference any previous UTXOs.
ErrMissingUTXOs = newBannableError("pair request contains no UTXOs")
Expand Down
2 changes: 1 addition & 1 deletion mixing/mixpool/mixpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ func (p *Pool) checkUTXOs(pr *wire.MsgMixPairReq, curHeight int64) error {
valid := validateOwnerProofP2PKHv0(extractPubKeyHash160,
entry.PkScript(), utxo.PubKey, utxo.Signature, pr.Expires())
if !valid {
return ruleError(ErrInvalidUTXOProof)
return ruleError(fmt.Errorf("invalid UTXO ownership proof"))
}

totalValue += entry.Amount()
Expand Down

0 comments on commit 23ab8a4

Please sign in to comment.