pub fn verify_backtracking_outputs(&self, tx_store: &mut store::Transactions, inputs: &Vec<TxPtr>) {


        for input_ptr in inputs.into_iter() {

            debug_assert!(input_ptr.is_guard());

            // read tx from disk
            let tx_raw_vec   = tx_store.read(*input_ptr);
            let mut tx_raw   = Buffer::new(tx_raw_vec.as_slice());

            let tx           = Transaction::parse(&mut tx_raw).
                    expect("Invalid tx data in database");

            // find indixes
            let input_index  = input_ptr.get_input_index() as usize;
            let ref input    = tx.txs_in[input_index];
            let output_index = input.prev_tx_out_idx as usize;

            ffi::verify_script(self.txs_out[output_index].pk_script, tx.to_raw(), input_index as u32)
                .expect("TODO: Handle script error without panic");


            // TODO: verify_amount here
        }
    }
/// Reverse script validation
///
/// This checks the passed input-ptrs are valid against the corresponding output of self
///
Reverse script validation
This checks the passed input-ptrs are valid against the corresponding output of self
Reverse script validation This checks the passed input - ptrs are valid against the corresponding output of self
pub fn verify_backtracking_outputs(&self, tx_store: &mut store::Transactions, inputs: &Vec<TxPtr>) {
        for input_ptr in inputs.into_iter() {
            debug_assert!(input_ptr.is_guard());
            // read tx from disk
            let tx_raw_vec   = tx_store.read(*input_ptr);
            let mut tx_raw   = Buffer::new(tx_raw_vec.as_slice());
            let tx           = Transaction::parse(&mut tx_raw).
                    expect("Invalid tx data in database");
            // find indixes
            let input_index  = input_ptr.get_input_index() as usize;
            let ref input    = tx.txs_in[input_index];
            let output_index = input.prev_tx_out_idx as usize;
            ffi::verify_script(self.txs_out[output_index].pk_script, tx.to_raw(), input_index as u32)
                .expect("TODO: Handle script error without panic");
            // TODO: verify_amount here
        }
    }
pub fn verify_backtracking_outputs ( & self , tx_store : & mut store :: Transactions , inputs : & Vec < TxPtr > ) { for input_ptr in inputs . into_iter ( ) { debug_assert ! ( input_ptr is_guard ( ) ) ; // read tx from disk let tx_raw_vec = tx_store . read ( * input_ptr ) ; let mut tx_raw = Buffer :: new ( tx_raw_vec . as_slice ( ) ) ; let tx = Transaction :: parse ( & mut tx_raw ) . expect ( " " ) ; // find indixes let input_index = input_ptr . get_input_index ( ) as usize ; let ref input = tx . txs_in [ input_index ] ; let output_index = input . prev_tx_out_idx as usize ; ffi :: verify_script ( self . txs_out [ output_index ] . pk_script , tx . to_raw ( ) , input_index as u32 ) . expect ( " " ) ; // TODO: verify_amount here } }
Reverse script validation
This checks the passed input-ptrs are valid against the corresponding output of self
Reverse script validation This checks the passed input - ptrs are valid against the corresponding output of self
&self
tx_store
&mut store::Transactions
inputs
&Vec<TxPtr>
&self
tx_store
&mut store::Transactions
inputs
&Vec<TxPtr>