Enum chain_impl_mockchain::error::Error
source · pub enum Error {
InputDoesNotResolve(UtxoPointer),
DoubleSpend(UtxoPointer, Output<Address>),
InputWasAlreadySet(UtxoPointer, Output<Address>, Output<Address>),
InvalidSignature(UtxoPointer, Output<Address>, Witness),
InvalidTxSignature(Witness),
TransactionSumIsNonZero(u64, u64),
NotEnoughSignatures(usize, usize),
ZeroOutput(Output<Address>),
}
Variants§
InputDoesNotResolve(UtxoPointer)
If the Ledger could not find the given input in the UTxO list it will report this error.
DoubleSpend(UtxoPointer, Output<Address>)
if the Ledger finds that the input has already been used once in a given transaction or block of transactions it will report this error.
the input here is the given input used twice, the output here is the output set in the first occurrence of the input, it will provide a bit of information to the user to figure out what went wrong
InputWasAlreadySet(UtxoPointer, Output<Address>, Output<Address>)
This error will happen if the input was already set and is now replaced by another output.
I.E: the value output has changed but the input is the same. This should not happen since changing the output will change the transaction identifier associated to this output.
first the input in common, then the original output and finally the new output
InvalidSignature(UtxoPointer, Output<Address>, Witness)
error occurs if the signature is invalid: either does not match the initial output or it is not cryptographically valid.
InvalidTxSignature(Witness)
error occurs when one of the witness does not sing entire transaction properly.
TransactionSumIsNonZero(u64, u64)
Transaction sum is not equal to zero, this means that we either generate or lose some money during the transaction.
NotEnoughSignatures(usize, usize)
Transaction does not have enough signatures. First value represents number of inputs (required signatures) Send value represents actual number of singatures.
ZeroOutput(Output<Address>)
Transaction output has a value of zero.