Payment channels: ByteString.EMPTY -> null

This commit is contained in:
Mike Hearn 2014-07-31 16:18:48 +02:00
parent 1153192be8
commit fe6f5aff01
3 changed files with 4 additions and 4 deletions

View File

@ -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);
}
/**

View File

@ -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.

View File

@ -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);