sgns::MigrationInputValidator¶
Implements the InputValidator for a Migration type.
#include <MigrationInputValidator.hpp>
Inherits from sgns::IInputValidator
Public Functions¶
| Name | |
|---|---|
| virtual bool | ValidateUTXOParameters(const UTXOTxParameters & params, const std::string & address, const UTXOManager & utxo_manager) const override Validates ownership and structure of the supplied UTXO parameters. |
| virtual bool | ValidateWitness(const ConsensusSubject & subject, const std::shared_ptr< GeniusTransaction > & tx, const UTXOTxParameters & params, const std::shared_ptr< Blockchain > & blockchain) const override Validates the chain-specific witness data associated with a transaction input set. |
| virtual bool | RequiresConsensusUTXOData() const override Indicates whether this validator requires consensus-provided UTXO data. |
| bool | Register() Registers this validator in the global registry for the "migration" chain ID. |
Additional inherited members¶
Public Types inherited from sgns::IInputValidator
| Name | |
|---|---|
| using const IInputValidator * | ValidatorPtr |
Public Functions inherited from sgns::IInputValidator
| Name | |
|---|---|
| virtual | ~IInputValidator() =default Destroys the input validator. |
| ValidatorPtr | Get(const std::string & chain_id) |
Public Functions Documentation¶
function ValidateUTXOParameters¶
virtual bool ValidateUTXOParameters(
const UTXOTxParameters & params,
const std::string & address,
const UTXOManager & utxo_manager
) const override
Validates ownership and structure of the supplied UTXO parameters.
Parameters:
- params UTXO inputs and outputs carried by the transaction.
- address Source address expected to own or authorize the inputs.
- utxo_manager Local UTXO manager used for ownership and signature checks when required.
Return: True when the parameters are structurally valid for this source chain.
Reimplements: sgns::IInputValidator::ValidateUTXOParameters
function ValidateWitness¶
virtual bool ValidateWitness(
const ConsensusSubject & subject,
const std::shared_ptr< GeniusTransaction > & tx,
const UTXOTxParameters & params,
const std::shared_ptr< Blockchain > & blockchain
) const override
Validates the chain-specific witness data associated with a transaction input set.
Parameters:
- subject Consensus subject that carries nonce, witness, and UTXO commitment data.
- tx Transaction whose inputs and outputs are being validated.
- params UTXO inputs and outputs carried by
tx. - blockchain Blockchain service used to resolve producer certificates when required.
Return: True when the witness proves that params are valid for tx.
Reimplements: sgns::IInputValidator::ValidateWitness
function RequiresConsensusUTXOData¶
Indicates whether this validator requires consensus-provided UTXO data.
Return: True when the validator needs UTXO witness and commitment data from consensus.
Reimplements: sgns::IInputValidator::RequiresConsensusUTXOData
function Register¶
Registers this validator in the global registry for the "migration" chain ID.
Return: true when the registration is done. This is used to ensure that the static instance is initialized and registered before main() starts.
Updated on 2026-06-28 at 18:54:57 -0700