3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 10:15:52 +00:00

Let balance check fail later iff the server wants maxValue

This commit is contained in:
Matt Corallo 2013-07-15 17:38:02 +02:00 committed by Mike Hearn
parent 00da963bbb
commit 0fe56bf544

View File

@ -61,8 +61,6 @@ public class PaymentChannelClientConnection {
*/
public PaymentChannelClientConnection(InetSocketAddress server, int timeoutSeconds, Wallet wallet, ECKey myKey,
BigInteger maxValue, String serverId) throws IOException, ValueOutOfRangeException {
if (wallet.getBalance().compareTo(maxValue) < 0)
throw new ValueOutOfRangeException("Insufficient balance in this wallet to open the requested payment channel.");
// Glue the object which vends/ingests protobuf messages in order to manage state to the network object which
// reads/writes them to the wire in length prefixed form.
channelClient = new PaymentChannelClient(wallet, myKey, maxValue, Sha256Hash.create(serverId.getBytes()),