PaymentChannelServer$2.smali

.class Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;
.super Ljava/lang/Object;
.source "PaymentChannelServer.java"

# interfaces
.implements Lcom/google/common/util/concurrent/q;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->receiveUpdatePaymentMessage(Lorg/bitcoin/paymentchannel/Protos$UpdatePayment;Z)V
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lcom/google/common/util/concurrent/q",
        "<",
        "Lcom/google/protobuf/ByteString;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelServer;

.field final synthetic val$ack:Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;


# direct methods
.method constructor <init>(Lorg/bitcoinj/protocols/channels/PaymentChannelServer;Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;)V
    .registers 3

    .prologue
    .line 416
    iput-object p1, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelServer;

    iput-object p2, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->val$ack:Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onFailure(Ljava/lang/Throwable;)V
    .registers 6

    .prologue
    .line 425
    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->log:Lorg/slf4j/Logger;
    invoke-static {}, Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->access$200()Lorg/slf4j/Logger;

    move-result-object v0

    const-string v1, "Failed retrieving paymentIncrease info future"

    invoke-interface {v0, v1}, Lorg/slf4j/Logger;->info(Ljava/lang/String;)V

    .line 426
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelServer;

    const-string v1, "Failed processing payment update"

    sget-object v2, Lorg/bitcoin/paymentchannel/Protos$Error$ErrorCode;->OTHER:Lorg/bitcoin/paymentchannel/Protos$Error$ErrorCode;

    sget-object v3, Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;->UPDATE_PAYMENT_FAILED:Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;

    # invokes: Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->error(Ljava/lang/String;Lorg/bitcoin/paymentchannel/Protos$Error$ErrorCode;Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;)V
    invoke-static {v0, v1, v2, v3}, Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->access$300(Lorg/bitcoinj/protocols/channels/PaymentChannelServer;Ljava/lang/String;Lorg/bitcoin/paymentchannel/Protos$Error$ErrorCode;Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;)V

    .line 427
    return-void
.end method

.method public onSuccess(Lcom/google/protobuf/ByteString;)V
    .registers 4

    .prologue
    .line 419
    if-eqz p1, :cond_11

    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->val$ack:Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;

    iget-object v1, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->val$ack:Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;

    invoke-virtual {v1}, Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;->getPaymentAckBuilder()Lorg/bitcoin/paymentchannel/Protos$PaymentAck$Builder;

    move-result-object v1

    invoke-virtual {v1, p1}, Lorg/bitcoin/paymentchannel/Protos$PaymentAck$Builder;->setInfo(Lcom/google/protobuf/ByteString;)Lorg/bitcoin/paymentchannel/Protos$PaymentAck$Builder;

    move-result-object v1

    invoke-virtual {v0, v1}, Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;->setPaymentAck(Lorg/bitcoin/paymentchannel/Protos$PaymentAck$Builder;)Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;

    .line 420
    :cond_11
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelServer;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->conn:Lorg/bitcoinj/protocols/channels/PaymentChannelServer$ServerConnection;
    invoke-static {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelServer;->access$100(Lorg/bitcoinj/protocols/channels/PaymentChannelServer;)Lorg/bitcoinj/protocols/channels/PaymentChannelServer$ServerConnection;

    move-result-object v0

    iget-object v1, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->val$ack:Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;

    invoke-virtual {v1}, Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage$Builder;->build()Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;

    move-result-object v1

    invoke-interface {v0, v1}, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$ServerConnection;->sendToClient(Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;)V

    .line 421
    return-void
.end method

.method public bridge synthetic onSuccess(Ljava/lang/Object;)V
    .registers 2

    .prologue
    .line 416
    check-cast p1, Lcom/google/protobuf/ByteString;

    invoke-virtual {p0, p1}, Lorg/bitcoinj/protocols/channels/PaymentChannelServer$2;->onSuccess(Lcom/google/protobuf/ByteString;)V

    return-void
.end method