Clean up Coin API for multiplications and divisions.

This commit is contained in:
Andreas Schildbach
2014-04-26 18:43:52 +02:00
committed by Mike Hearn
parent eb81b0c815
commit 48a76a8a03
9 changed files with 46 additions and 48 deletions

View File

@@ -40,7 +40,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import static com.google.bitcoin.core.Coin.CENT;
import static com.google.bitcoin.core.Coin.TEN;
/**
* Simple client that connects to the given host, opens a channel, and pays one cent.
@@ -123,7 +122,7 @@ public class ExamplePaymentChannelClient {
// we are not allowed to have payment channels that pay nothing at all.
log.info("Success! Trying to make {} micropayments. Already paid {} satoshis on this channel",
times, client.state().getValueSpent());
final Coin MICROPAYMENT_SIZE = CENT.divide(TEN);
final Coin MICROPAYMENT_SIZE = CENT.divide(10);
for (int i = 0; i < times; i++) {
try {
// Wait because the act of making a micropayment is async, and we're not allowed to overlap.