Trait fuel_tx::FormatValidityChecks
source · pub trait FormatValidityChecks {
// Required methods
fn check_signatures(
&self,
parameters: &ConsensusParameters
) -> Result<(), CheckError>;
fn check_without_signatures(
&self,
block_height: BlockHeight,
parameters: &ConsensusParameters
) -> Result<(), CheckError>;
// Provided method
fn check(
&self,
block_height: BlockHeight,
parameters: &ConsensusParameters
) -> Result<(), CheckError> { ... }
}
Expand description
Contains logic for stateless validations that don’t result in any reusable metadata such as spendable input balances or remaining gas. Primarily involves validating that transaction fields are correctly formatted and signed.
Required Methods§
sourcefn check_signatures(
&self,
parameters: &ConsensusParameters
) -> Result<(), CheckError>
fn check_signatures( &self, parameters: &ConsensusParameters ) -> Result<(), CheckError>
Validates that all required signatures are set in the transaction and that they are valid.
sourcefn check_without_signatures(
&self,
block_height: BlockHeight,
parameters: &ConsensusParameters
) -> Result<(), CheckError>
fn check_without_signatures( &self, block_height: BlockHeight, parameters: &ConsensusParameters ) -> Result<(), CheckError>
Validates the transactions according to rules from the specification: https://github.com/FuelLabs/fuel-specs/blob/master/src/protocol/tx_format/transaction.md#transaction
Provided Methods§
sourcefn check(
&self,
block_height: BlockHeight,
parameters: &ConsensusParameters
) -> Result<(), CheckError>
fn check( &self, block_height: BlockHeight, parameters: &ConsensusParameters ) -> Result<(), CheckError>
Performs all stateless transaction validity checks. This includes the validity of fields according to rules in the specification and validity of signatures.