mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
remove redundant verify_proof call (#835)
* we verify rangeproofs in sum_commitments (in verify_kernels) remove this redundant (and expensive) rangeproof verification * rustfmt
This commit is contained in:
parent
e3601b6c8e
commit
5a47a17101
1 changed files with 5 additions and 11 deletions
|
@ -302,11 +302,11 @@ impl Readable for Transaction {
|
|||
let (input_len, output_len, kernel_len) =
|
||||
ser_multiread!(reader, read_u64, read_u64, read_u64);
|
||||
|
||||
if input_len > consensus::MAX_TX_INPUTS
|
||||
|| output_len > consensus::MAX_TX_OUTPUTS
|
||||
|| kernel_len > consensus::MAX_TX_KERNELS {
|
||||
return Err(ser::Error::CorruptedData)
|
||||
}
|
||||
if input_len > consensus::MAX_TX_INPUTS || output_len > consensus::MAX_TX_OUTPUTS
|
||||
|| kernel_len > consensus::MAX_TX_KERNELS
|
||||
{
|
||||
return Err(ser::Error::CorruptedData);
|
||||
}
|
||||
|
||||
let inputs = read_and_verify_sorted(reader, input_len)?;
|
||||
let outputs = read_and_verify_sorted(reader, output_len)?;
|
||||
|
@ -457,13 +457,7 @@ impl Transaction {
|
|||
return Err(Error::TooManyInputs);
|
||||
}
|
||||
self.verify_sorted()?;
|
||||
|
||||
self.verify_inputs()?;
|
||||
|
||||
for out in &self.outputs {
|
||||
out.verify_proof()?;
|
||||
}
|
||||
|
||||
self.verify_kernels()?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue