Exemplo n.º 1
0
def handle_contract_send_channelupdate2(
        raiden: RaidenService,
        channel_update_event: ContractSendChannelUpdateTransfer,
):
    balance_proof = channel_update_event.balance_proof

    if balance_proof:
        channel = raiden.chain.payment_channel(
            token_network_address=channel_update_event.token_network_identifier,
            channel_id=channel_update_event.channel_identifier,
        )

        our_signature = signing_update_data(
            balance_proof,
            raiden.chain.network_id,
            raiden.privkey,
        )

        channel.update_transfer(
            balance_proof.nonce,
            balance_proof.balance_hash,
            balance_proof.message_hash,
            balance_proof.signature,
            our_signature,
        )
Exemplo n.º 2
0
def handle_contract_send_channelupdate(
        raiden: RaidenService,
        channel_update_event: ContractSendChannelUpdateTransfer,
):
    balance_proof = channel_update_event.balance_proof

    if balance_proof:
        channel = raiden.chain.payment_channel(
            token_network_address=channel_update_event.token_network_identifier,
            channel_id=channel_update_event.channel_identifier,
        )

        our_signature = signing_update_data(
            balance_proof,
            raiden.privkey,
        )

        channel.update_transfer(
            balance_proof.nonce,
            balance_proof.balance_hash,
            balance_proof.message_hash,
            balance_proof.signature,
            our_signature,
        )