Exception: BSV::Transaction::VerificationError
- Inherits:
-
StandardError
- Object
- StandardError
- BSV::Transaction::VerificationError
- Defined in:
- lib/bsv/transaction/verification_error.rb
Overview
Error raised during SPV verification.
Carries a machine-readable code alongside a human-readable message, matching the typed error pattern used by the Go SDK (ErrInvalidMerklePath, ErrFeeTooLow, ErrScriptVerificationFailed).
Error Codes
-
:invalid_merkle_proof— merkle path verification failed against the chain tracker -
:insufficient_fee— transaction fee is below the fee model’s requirement -
:output_overflow— total outputs exceed total inputs -
:script_failure— script interpreter rejected an input (originalScriptErrorin#cause) -
:missing_source— required input data (unlocking script, source locking script, or source satoshis) is absent
Constant Summary collapse
- INVALID_MERKLE_PROOF =
:invalid_merkle_proof- INSUFFICIENT_FEE =
:insufficient_fee- OUTPUT_OVERFLOW =
:output_overflow- SCRIPT_FAILURE =
:script_failure- MISSING_SOURCE =
:missing_source
Instance Attribute Summary collapse
-
#code ⇒ Symbol
readonly
The error code.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ VerificationError
constructor
A new instance of VerificationError.
Constructor Details
#initialize(code, message) ⇒ VerificationError
Returns a new instance of VerificationError.
31 32 33 34 |
# File 'lib/bsv/transaction/verification_error.rb', line 31 def initialize(code, ) @code = code super() end |
Instance Attribute Details
#code ⇒ Symbol (readonly)
Returns the error code.
21 22 23 |
# File 'lib/bsv/transaction/verification_error.rb', line 21 def code @code end |