pub fn apply_block(&mut self, b: &Block) -> Result<(), Error> {
		let mut affected_pos = vec![];

		for out in b.outputs() {
			let pos = self.apply_output(out)?;
			affected_pos.push(pos);
			self.batch
				.save_output_pos_height(&out.commitment(), pos, b.header.height)?;
		}

		for input in b.inputs() {
			let pos = self.apply_input(input)?;
			affected_pos.push(pos);
		}

		for kernel in b.kernels() {
			self.apply_kernel(kernel)?;
		}

		// Update our BitmapAccumulator based on affected outputs (both spent and created).
		self.apply_to_bitmap_accumulator(&affected_pos)?;

		// Update the head of the extension to reflect the block we just applied.
		self.head = Tip::from_header(&b.header);

		Ok(())
	}
/// Apply a new block to the current txhashet extension (output, rangeproof, kernel MMRs).
Apply a new block to the current txhashet extension (output, rangeproof, kernel MMRs).
Apply a new block to the current txhashet extension ( output rangeproof kernel MMRs ) .
pub fn apply_block(&mut self, b: &Block) -> Result<(), Error> {
		let mut affected_pos = vec![];
		for out in b.outputs() {
			let pos = self.apply_output(out)?;
			affected_pos.push(pos);
			self.batch
				.save_output_pos_height(&out.commitment(), pos, b.header.height)?;
		}
		for input in b.inputs() {
			let pos = self.apply_input(input)?;
			affected_pos.push(pos);
		}
		for kernel in b.kernels() {
			self.apply_kernel(kernel)?;
		}
		// Update our BitmapAccumulator based on affected outputs (both spent and created).
		self.apply_to_bitmap_accumulator(&affected_pos)?;
		// Update the head of the extension to reflect the block we just applied.
		self.head = Tip::from_header(&b.header);
		Ok(())
	}
pub fn apply_block ( & mut self , b : & Block ) -> Result < ( ) , Error > { let mut affected_pos = vec ! [ ] ; for out in b . outputs ( ) { let pos = self . apply_output ( out ) ? ; affected_pos . push ( pos ) ; self . batch . save_output_pos_height ( & out . commitment ( ) , pos , b . header . height ) ? ; } for input in b . inputs ( ) { let pos = self . apply_input ( input ) ? ; affected_pos . push ( pos ) ; } for kernel in b . kernels ( ) { self . apply_kernel ( kernel ) ? ; } // Update our BitmapAccumulator based on affected outputs (both spent and created). self . apply_to_bitmap_accumulator ( & affected_pos ) ? ; // Update the head of the extension to reflect the block we just applied. self . head = Tip :: from_header ( & b . header ) ; Ok ( ( ) ) }
Apply a new block to the current txhashet extension (output, rangeproof, kernel MMRs).
Apply a new block to the current txhashet extension ( output rangeproof kernel MMRs ) .
&mut self
b
&Block
&mut self
b
&Block