mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 18:22:12 +01:00
Payment channels: ByteString.EMPTY -> null
This commit is contained in:
parent
1153192be8
commit
fe6f5aff01
@ -469,7 +469,7 @@ public class PaymentChannelClient implements IPaymentChannelClient {
|
||||
* @return a future that completes when the server acknowledges receipt and acceptance of the payment.
|
||||
*/
|
||||
public ListenableFuture<Coin> incrementPayment(Coin size) throws ValueOutOfRangeException, IllegalStateException {
|
||||
return incrementPayment(size, ByteString.EMPTY);
|
||||
return incrementPayment(size, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,7 +137,7 @@ public class PaymentChannelClientConnection {
|
||||
* (see {@link PaymentChannelClientConnection#getChannelOpenFuture()} for the second)
|
||||
*/
|
||||
public ListenableFuture<Coin> incrementPayment(Coin size) throws ValueOutOfRangeException, IllegalStateException {
|
||||
return channelClient.incrementPayment(size, ByteString.EMPTY);
|
||||
return channelClient.incrementPayment(size, null);
|
||||
}
|
||||
/**
|
||||
* Increments the total value which we pay the server.
|
||||
|
@ -171,8 +171,8 @@ public class ChannelConnectionTest extends TestWithWallet {
|
||||
|
||||
Thread.sleep(1250); // No timeouts once the channel is open
|
||||
Coin amount = client.state().getValueSpent();
|
||||
q.take().assertPair(amount, ByteString.EMPTY);
|
||||
ByteString[] infos = new ByteString[]{ByteString.EMPTY, ByteString.copyFromUtf8("one"),ByteString.copyFromUtf8("two")};
|
||||
q.take().assertPair(amount, null);
|
||||
ByteString[] infos = new ByteString[]{null, ByteString.copyFromUtf8("one"),ByteString.copyFromUtf8("two")};
|
||||
for (ByteString info : infos) {
|
||||
client.incrementPayment(CENT, info).get();
|
||||
amount = amount.add(CENT);
|
||||
|
Loading…
Reference in New Issue
Block a user