mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
Remove oddfee error references + validation check (#975)
This commit is contained in:
parent
891382653d
commit
a8cc58bb89
1 changed files with 0 additions and 7 deletions
|
@ -49,10 +49,6 @@ bitflags! {
|
||||||
/// Errors thrown by Block validation
|
/// Errors thrown by Block validation
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Transaction fee can't be odd, due to half fee burning
|
|
||||||
OddFee,
|
|
||||||
/// Kernel fee can't be odd, due to half fee burning
|
|
||||||
OddKernelFee,
|
|
||||||
/// Underlying Secp256k1 error (signature validation or invalid public key
|
/// Underlying Secp256k1 error (signature validation or invalid public key
|
||||||
/// typically)
|
/// typically)
|
||||||
Secp(secp::Error),
|
Secp(secp::Error),
|
||||||
|
@ -421,9 +417,6 @@ impl Transaction {
|
||||||
/// excess value against the signature as well as range proofs for each
|
/// excess value against the signature as well as range proofs for each
|
||||||
/// output.
|
/// output.
|
||||||
pub fn validate(&self) -> Result<(), Error> {
|
pub fn validate(&self) -> Result<(), Error> {
|
||||||
if self.fee() & 1 != 0 {
|
|
||||||
return Err(Error::OddFee);
|
|
||||||
}
|
|
||||||
if self.inputs.len() > consensus::MAX_BLOCK_INPUTS {
|
if self.inputs.len() > consensus::MAX_BLOCK_INPUTS {
|
||||||
return Err(Error::TooManyInputs);
|
return Err(Error::TooManyInputs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue