paych: Print available amounts in paych status
This commit is contained in:
parent
7a938b2dea
commit
8f6f21c94c
@ -854,6 +854,10 @@ type ChannelAvailableFunds struct {
|
|||||||
ConfirmedAmt types.BigInt
|
ConfirmedAmt types.BigInt
|
||||||
// PendingAmt is the amount of funds that are pending confirmation on-chain
|
// PendingAmt is the amount of funds that are pending confirmation on-chain
|
||||||
PendingAmt types.BigInt
|
PendingAmt types.BigInt
|
||||||
|
// AvailableAmt is part of ConfirmedAmt that is available for use (pre-allocated)
|
||||||
|
AvailableAmt types.BigInt
|
||||||
|
// PendingAvailableAmt is the amount of available funds that are pending confirmation on-chain
|
||||||
|
PendingAvailableAmt types.BigInt
|
||||||
// PendingWaitSentinel can be used with PaychGetWaitReady to wait for
|
// PendingWaitSentinel can be used with PaychGetWaitReady to wait for
|
||||||
// confirmation of pending funds
|
// confirmation of pending funds
|
||||||
PendingWaitSentinel *cid.Cid
|
PendingWaitSentinel *cid.Cid
|
||||||
|
@ -191,6 +191,8 @@ func paychStatus(writer io.Writer, avail *api.ChannelAvailableFunds) {
|
|||||||
{"To", avail.To.String()},
|
{"To", avail.To.String()},
|
||||||
{"Confirmed Amt", fmt.Sprintf("%s", types.FIL(avail.ConfirmedAmt))},
|
{"Confirmed Amt", fmt.Sprintf("%s", types.FIL(avail.ConfirmedAmt))},
|
||||||
{"Pending Amt", fmt.Sprintf("%s", types.FIL(avail.PendingAmt))},
|
{"Pending Amt", fmt.Sprintf("%s", types.FIL(avail.PendingAmt))},
|
||||||
|
{"Available Amt", fmt.Sprintf("%s", types.FIL(avail.AvailableAmt))},
|
||||||
|
{"Pending Available Amt", fmt.Sprintf("%s", types.FIL(avail.PendingAvailableAmt))},
|
||||||
{"Queued Amt", fmt.Sprintf("%s", types.FIL(avail.QueuedAmt))},
|
{"Queued Amt", fmt.Sprintf("%s", types.FIL(avail.QueuedAmt))},
|
||||||
{"Voucher Redeemed Amt", fmt.Sprintf("%s", types.FIL(avail.VoucherReedeemedAmt))},
|
{"Voucher Redeemed Amt", fmt.Sprintf("%s", types.FIL(avail.VoucherReedeemedAmt))},
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,8 @@ func (pm *Manager) AvailableFundsByFromTo(ctx context.Context, from address.Addr
|
|||||||
To: to,
|
To: to,
|
||||||
ConfirmedAmt: types.NewInt(0),
|
ConfirmedAmt: types.NewInt(0),
|
||||||
PendingAmt: types.NewInt(0),
|
PendingAmt: types.NewInt(0),
|
||||||
|
AvailableAmt: types.NewInt(0),
|
||||||
|
PendingAvailableAmt: types.NewInt(0),
|
||||||
PendingWaitSentinel: nil,
|
PendingWaitSentinel: nil,
|
||||||
QueuedAmt: types.NewInt(0),
|
QueuedAmt: types.NewInt(0),
|
||||||
VoucherReedeemedAmt: types.NewInt(0),
|
VoucherReedeemedAmt: types.NewInt(0),
|
||||||
|
@ -340,6 +340,8 @@ func (ca *channelAccessor) currentAvailableFunds(ctx context.Context, channelID
|
|||||||
To: channelInfo.to(),
|
To: channelInfo.to(),
|
||||||
ConfirmedAmt: channelInfo.Amount,
|
ConfirmedAmt: channelInfo.Amount,
|
||||||
PendingAmt: channelInfo.PendingAmount,
|
PendingAmt: channelInfo.PendingAmount,
|
||||||
|
AvailableAmt: channelInfo.AvailableAmount,
|
||||||
|
PendingAvailableAmt: channelInfo.PendingAvailableAmount,
|
||||||
PendingWaitSentinel: waitSentinel,
|
PendingWaitSentinel: waitSentinel,
|
||||||
QueuedAmt: queuedAmt,
|
QueuedAmt: queuedAmt,
|
||||||
VoucherReedeemedAmt: totalRedeemed,
|
VoucherReedeemedAmt: totalRedeemed,
|
||||||
|
Loading…
Reference in New Issue
Block a user