paychmgr: AvailableAmt -> NonReservedAmt
This commit is contained in:
1 parent
e961766e4b
commit
384999556c
7 files changed
+14
-11
No files matched your search
+7
-4
@@ -859,20 +859,23 @@ type ChannelAvailableFunds struct {
|
||||
From address.Address
|
||||
// To is the to address of the channel
|
||||
To address.Address
|
||||
// ConfirmedAmt is the amount of funds that have been confirmed on-chain
|
||||
// for the channel
|
||||
|
||||
// ConfirmedAmt is the total amount of funds that have been confirmed on-chain for the channel
|
||||
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
|
||||
|
||||
// NonReservedAmt is part of ConfirmedAmt that is available for use (e.g. when the payment channel was pre-funded)
|
||||
NonReservedAmt types.BigInt
|
||||
// PendingAvailableAmt is the amount of funds that are pending confirmation on-chain that will become available once confirmed
|
||||
PendingAvailableAmt types.BigInt
|
||||
|
||||
// PendingWaitSentinel can be used with PaychGetWaitReady to wait for
|
||||
// confirmation of pending funds
|
||||
PendingWaitSentinel *cid.Cid
|
||||
// QueuedAmt is the amount that is queued up behind a pending request
|
||||
QueuedAmt types.BigInt
|
||||
|
||||
// VoucherRedeemedAmt is the amount that is redeemed by vouchers on-chain
|
||||
// and in the local datastore
|
||||
VoucherReedeemedAmt types.BigInt
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -200,7 +200,7 @@ func paychStatus(writer io.Writer, avail *lapi.ChannelAvailableFunds) {
|
||||
{"From", avail.From.String()},
|
||||
{"To", avail.To.String()},
|
||||
{"Confirmed Amt", fmt.Sprintf("%s", types.FIL(avail.ConfirmedAmt))},
|
||||
{"Available Amt", fmt.Sprintf("%s", types.FIL(avail.AvailableAmt))},
|
||||
{"Available Amt", fmt.Sprintf("%s", types.FIL(avail.NonReservedAmt))},
|
||||
{"Voucher Redeemed Amt", fmt.Sprintf("%s", types.FIL(avail.VoucherReedeemedAmt))},
|
||||
{"Pending Amt", fmt.Sprintf("%s", types.FIL(avail.PendingAmt))},
|
||||
{"Pending Available Amt", fmt.Sprintf("%s", types.FIL(avail.PendingAvailableAmt))},
|
||||
|
||||
@@ -4061,7 +4061,7 @@ Response:
|
||||
"To": "f01234",
|
||||
"ConfirmedAmt": "0",
|
||||
"PendingAmt": "0",
|
||||
"AvailableAmt": "0",
|
||||
"NonReservedAmt": "0",
|
||||
"PendingAvailableAmt": "0",
|
||||
"PendingWaitSentinel": null,
|
||||
"QueuedAmt": "0",
|
||||
@@ -4090,7 +4090,7 @@ Response:
|
||||
"To": "f01234",
|
||||
"ConfirmedAmt": "0",
|
||||
"PendingAmt": "0",
|
||||
"AvailableAmt": "0",
|
||||
"NonReservedAmt": "0",
|
||||
"PendingAvailableAmt": "0",
|
||||
"PendingWaitSentinel": null,
|
||||
"QueuedAmt": "0",
|
||||
|
||||
@@ -4457,7 +4457,7 @@ Response:
|
||||
"To": "f01234",
|
||||
"ConfirmedAmt": "0",
|
||||
"PendingAmt": "0",
|
||||
"AvailableAmt": "0",
|
||||
"NonReservedAmt": "0",
|
||||
"PendingAvailableAmt": "0",
|
||||
"PendingWaitSentinel": null,
|
||||
"QueuedAmt": "0",
|
||||
@@ -4486,7 +4486,7 @@ Response:
|
||||
"To": "f01234",
|
||||
"ConfirmedAmt": "0",
|
||||
"PendingAmt": "0",
|
||||
"AvailableAmt": "0",
|
||||
"NonReservedAmt": "0",
|
||||
"PendingAvailableAmt": "0",
|
||||
"PendingWaitSentinel": null,
|
||||
"QueuedAmt": "0",
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ func (pm *Manager) AvailableFundsByFromTo(ctx context.Context, from address.Addr
|
||||
To: to,
|
||||
ConfirmedAmt: types.NewInt(0),
|
||||
PendingAmt: types.NewInt(0),
|
||||
AvailableAmt: types.NewInt(0),
|
||||
NonReservedAmt: types.NewInt(0),
|
||||
PendingAvailableAmt: types.NewInt(0),
|
||||
PendingWaitSentinel: nil,
|
||||
QueuedAmt: types.NewInt(0),
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ func (ca *channelAccessor) currentAvailableFunds(ctx context.Context, channelID
|
||||
To: channelInfo.to(),
|
||||
ConfirmedAmt: channelInfo.Amount,
|
||||
PendingAmt: channelInfo.PendingAmount,
|
||||
AvailableAmt: channelInfo.AvailableAmount,
|
||||
NonReservedAmt: channelInfo.AvailableAmount,
|
||||
PendingAvailableAmt: channelInfo.PendingAvailableAmount,
|
||||
PendingWaitSentinel: waitSentinel,
|
||||
QueuedAmt: queuedAmt,
|
||||
|
||||
Reference in new issue
Block a user