pub fn generate_revoke_token<E: Engine>(channel_state: &ChannelState<E>,
                                            old_cust_state: &mut CustomerState<E>,
                                            new_cust_state: CustomerState<E>,
                                            new_close_token: &cl::Signature<E>) -> RevokeToken {
        // let's update the old wallet
        assert!(old_cust_state.update(new_cust_state));
        // generate the token after verifying that the close token is valid
        let (message, signature) = old_cust_state.generate_revoke_token(channel_state, new_close_token).unwrap();
        // return the revoke token (msg + sig pair)
        return RevokeToken { message, signature };
    }
///
/// generate_revoke_token (phase 2) - takes as input the public params, old wallet, new wallet,
/// merchant's verification key and refund token. If the refund token is valid, generate
/// a revocation token for the old wallet public key.
///
generate_revoke_token (phase 2) - takes as input the public params, old wallet, new wallet,
merchant's verification key and refund token. If the refund token is valid, generate
a revocation token for the old wallet public key.
generate_revoke_token ( phase 2 ) - takes as input the public params old wallet new wallet merchant ' s verification key and refund token . If the refund token is valid generate a revocation token for the old wallet public key .
pub fn generate_revoke_token<E: Engine>(channel_state: &ChannelState<E>,
                                            old_cust_state: &mut CustomerState<E>,
                                            new_cust_state: CustomerState<E>,
                                            new_close_token: &cl::Signature<E>) -> RevokeToken {
        // let's update the old wallet
        assert!(old_cust_state.update(new_cust_state));
        // generate the token after verifying that the close token is valid
        let (message, signature) = old_cust_state.generate_revoke_token(channel_state, new_close_token).unwrap();
        // return the revoke token (msg + sig pair)
        return RevokeToken { message, signature };
    }
pub fn generate_revoke_token < E : Engine > ( channel_state : & ChannelState < E > , old_cust_state : & mut CustomerState < E > , new_cust_state : CustomerState < E > , new_close_token : & cl :: Signature < E > ) -> RevokeToken { // let's update the old wallet assert ! ( old_cust_state update ( new_cust_state ) ) ; // generate the token after verifying that the close token is valid let ( message , signature ) = old_cust_state . generate_revoke_token ( channel_state , new_close_token ) . unwrap ( ) ; // return the revoke token (msg + sig pair) return RevokeToken { message , signature } ; }
generate_revoke_token (phase 2) - takes as input the public params, old wallet, new wallet,
merchant's verification key and refund token.
generate_revoke_token ( phase 2 ) - takes as input the public params old wallet new wallet merchant ' s verification key and refund token .
channel_state
&ChannelState<E>
old_cust_state
&mut CustomerState<E>
new_cust_state
CustomerState<E>
new_close_token
&cl::Signature<E>
channel_state
&ChannelState<E>
old_cust_state
&mut CustomerState<E>
new_cust_state
CustomerState<E>
new_close_token
&cl::Signature<E>