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:
parent
00da963bbb
commit
0fe56bf544
@ -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()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user