pub fn establish_customer_final<E: Engine>(channel_state: &mut ChannelState<E>, cust_state: &mut CustomerState<E>, pay_token: &cl::Signature<E>) -> bool {
        // verify the pay-token first
        if !cust_state.verify_pay_token(&channel_state, pay_token) {
            println!("establish_customer_final - Failed to verify the pay-token");
            return false;
        }

        // only if both tokens have been stored
        if (cust_state.has_tokens()) {
            // must be an old wallet
            channel_state.channel_established = true;
        }
        return channel_state.channel_established;
    }
///
/// establish_customer_final - takes as input the channel state, customer state,
/// and pay token (blinded sig) obtained from merchant. Add the returned
/// blinded signature to the wallet.
///
takes as input the channel state, customer state,
and pay token (blinded sig) obtained from merchant. Add the returned
blinded signature to the wallet.
takes as input the channel state customer state and pay token ( blinded sig ) obtained from merchant . Add the returned blinded signature to the wallet .
pub fn establish_customer_final<E: Engine>(channel_state: &mut ChannelState<E>, cust_state: &mut CustomerState<E>, pay_token: &cl::Signature<E>) -> bool {
        // verify the pay-token first
        if !cust_state.verify_pay_token(&channel_state, pay_token) {
            println!("establish_customer_final - Failed to verify the pay-token");
            return false;
        }
        // only if both tokens have been stored
        if (cust_state.has_tokens()) {
            // must be an old wallet
            channel_state.channel_established = true;
        }
        return channel_state.channel_established;
    }
pub fn establish_customer_final < E : Engine > ( channel_state : & mut ChannelState < E > , cust_state : & mut CustomerState < E > , pay_token : & cl :: Signature < E > ) -> bool { // verify the pay-token first if ! cust_state . verify_pay_token ( & channel_state , pay_token ) { println ! ( " " ) ; return false ; } // only if both tokens have been stored if ( cust_state . has_tokens ( ) ) { // must be an old wallet channel_state . channel_established = true ; } return channel_state . channel_established ; }
establish_customer_final - takes as input the channel state, customer state,
and pay token (blinded sig) obtained from merchant.
establish_customer_final - takes as input the channel state customer state and pay token ( blinded sig ) obtained from merchant .
channel_state
&mut ChannelState<E>
cust_state
&mut CustomerState<E>
pay_token
&cl::Signature<E>
channel_state
&mut ChannelState<E>
cust_state
&mut CustomerState<E>
pay_token
&cl::Signature<E>