mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Payment channels: better logging in client state.
This commit is contained in:
parent
d0a431cd9c
commit
89b6b54d24
@ -199,6 +199,8 @@ public class PaymentChannelClientState {
|
|||||||
refundFees = multisigFee;
|
refundFees = multisigFee;
|
||||||
}
|
}
|
||||||
refundTx.getConfidence().setSource(TransactionConfidence.Source.SELF);
|
refundTx.getConfidence().setSource(TransactionConfidence.Source.SELF);
|
||||||
|
log.info("initiated channel with multi-sig contract {}, refund {}", multisigContract.getHashAsString(),
|
||||||
|
refundTx.getHashAsString());
|
||||||
state = State.INITIATED;
|
state = State.INITIATED;
|
||||||
// Client should now call getIncompleteRefundTransaction() and send it to the server.
|
// Client should now call getIncompleteRefundTransaction() and send it to the server.
|
||||||
}
|
}
|
||||||
@ -309,7 +311,7 @@ public class PaymentChannelClientState {
|
|||||||
if (Transaction.MIN_NONDUST_OUTPUT.compareTo(newValueToMe) > 0 && !newValueToMe.equals(BigInteger.ZERO))
|
if (Transaction.MIN_NONDUST_OUTPUT.compareTo(newValueToMe) > 0 && !newValueToMe.equals(BigInteger.ZERO))
|
||||||
throw new ValueOutOfRangeException("New value being sent back as change was smaller than minimum nondust output");
|
throw new ValueOutOfRangeException("New value being sent back as change was smaller than minimum nondust output");
|
||||||
Transaction tx = makeUnsignedChannelContract(newValueToMe);
|
Transaction tx = makeUnsignedChannelContract(newValueToMe);
|
||||||
log.info("Signing new contract: {}", tx);
|
log.info("Signing new payment tx {}", tx);
|
||||||
Transaction.SigHash mode;
|
Transaction.SigHash mode;
|
||||||
// If we spent all the money we put into this channel, we (by definition) don't care what the outputs are, so
|
// If we spent all the money we put into this channel, we (by definition) don't care what the outputs are, so
|
||||||
// we sign with SIGHASH_NONE to let the server do what it wants.
|
// we sign with SIGHASH_NONE to let the server do what it wants.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user