cleanup validate() no need to return kernel sums (#3456)

This commit is contained in:
Antioch Peverell 2020-10-01 14:56:37 +01:00 committed by GitHub
parent 0aec8b533b
commit cc4e608d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -739,7 +739,7 @@ impl Block {
&self,
prev_kernel_offset: &BlindingFactor,
verifier: Arc<RwLock<dyn VerifierCache>>,
) -> Result<Commitment, Error> {
) -> Result<(), Error> {
self.body.validate(Weighting::AsBlock, verifier)?;
self.verify_kernel_lock_heights()?;
@ -748,12 +748,12 @@ impl Block {
// take the kernel offset for this block (block offset minus previous) and
// verify.body.outputs and kernel sums
let (_utxo_sum, kernel_sum) = self.verify_kernel_sums(
self.verify_kernel_sums(
self.header.overage(),
self.block_kernel_offset(prev_kernel_offset.clone())?,
)?;
Ok(kernel_sum)
Ok(())
}
/// Validate the coinbase.body.outputs generated by miners.