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
|
||||
// PendingAmt is the amount of funds that are pending confirmation on-chain
|
||||
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
|
||||
// confirmation of pending funds
|
||||
PendingWaitSentinel *cid.Cid
|
||||
|
@ -191,6 +191,8 @@ func paychStatus(writer io.Writer, avail *api.ChannelAvailableFunds) {
|
||||
{"To", avail.To.String()},
|
||||
{"Confirmed Amt", fmt.Sprintf("%s", types.FIL(avail.ConfirmedAmt))},
|
||||
{"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))},
|
||||
{"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,
|
||||
ConfirmedAmt: types.NewInt(0),
|
||||
PendingAmt: types.NewInt(0),
|
||||
AvailableAmt: types.NewInt(0),
|
||||
PendingAvailableAmt: types.NewInt(0),
|
||||
PendingWaitSentinel: nil,
|
||||
QueuedAmt: types.NewInt(0),
|
||||
VoucherReedeemedAmt: types.NewInt(0),
|
||||
|
@ -340,6 +340,8 @@ func (ca *channelAccessor) currentAvailableFunds(ctx context.Context, channelID
|
||||
To: channelInfo.to(),
|
||||
ConfirmedAmt: channelInfo.Amount,
|
||||
PendingAmt: channelInfo.PendingAmount,
|
||||
AvailableAmt: channelInfo.AvailableAmount,
|
||||
PendingAvailableAmt: channelInfo.PendingAvailableAmount,
|
||||
PendingWaitSentinel: waitSentinel,
|
||||
QueuedAmt: queuedAmt,
|
||||
VoucherReedeemedAmt: totalRedeemed,
|
||||
|
Loading…
Reference in New Issue
Block a user