mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
lnrpc: add commit fees to WaitingPendingClose
This commit is contained in:
parent
fd6b397496
commit
8b83c1f7f9
1460
lnrpc/rpc.pb.go
1460
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -2028,6 +2028,24 @@ message PendingChannelsResponse {
|
|||||||
|
|
||||||
/// Hash of the remote pending version of the commitment tx.
|
/// Hash of the remote pending version of the commitment tx.
|
||||||
string remote_pending_txid = 3;
|
string remote_pending_txid = 3;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The amount in satoshis calculated to be paid in fees for the local
|
||||||
|
commitment.
|
||||||
|
*/
|
||||||
|
uint64 local_commit_fee_sat = 4;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The amount in satoshis calculated to be paid in fees for the remote
|
||||||
|
commitment.
|
||||||
|
*/
|
||||||
|
uint64 remote_commit_fee_sat = 5;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The amount in satoshis calculated to be paid in fees for the remote
|
||||||
|
pending commitment.
|
||||||
|
*/
|
||||||
|
uint64 remote_pending_commit_fee_sat = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ClosedChannel {
|
message ClosedChannel {
|
||||||
|
@ -1617,6 +1617,21 @@
|
|||||||
"remote_pending_txid": {
|
"remote_pending_txid": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "/ Hash of the remote pending version of the commitment tx."
|
"description": "/ Hash of the remote pending version of the commitment tx."
|
||||||
|
},
|
||||||
|
"local_commit_fee_sat": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64",
|
||||||
|
"description": "The amount in satoshis calculated to be paid in fees for the local\ncommitment."
|
||||||
|
},
|
||||||
|
"remote_commit_fee_sat": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64",
|
||||||
|
"description": "The amount in satoshis calculated to be paid in fees for the remote\ncommitment."
|
||||||
|
},
|
||||||
|
"remote_pending_commit_fee_sat": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64",
|
||||||
|
"description": "The amount in satoshis calculated to be paid in fees for the remote\npending commitment."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
12
rpcserver.go
12
rpcserver.go
@ -2800,6 +2800,10 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
|
|||||||
commitments.LocalTxid =
|
commitments.LocalTxid =
|
||||||
waitingClose.LocalCommitment.CommitTx.TxHash().
|
waitingClose.LocalCommitment.CommitTx.TxHash().
|
||||||
String()
|
String()
|
||||||
|
|
||||||
|
commitments.LocalCommitFeeSat = uint64(
|
||||||
|
waitingClose.LocalCommitment.CommitFee,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report remote commit. May not be present when DLP is active.
|
// Report remote commit. May not be present when DLP is active.
|
||||||
@ -2807,6 +2811,10 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
|
|||||||
commitments.RemoteTxid =
|
commitments.RemoteTxid =
|
||||||
waitingClose.RemoteCommitment.CommitTx.TxHash().
|
waitingClose.RemoteCommitment.CommitTx.TxHash().
|
||||||
String()
|
String()
|
||||||
|
|
||||||
|
commitments.RemoteCommitFeeSat = uint64(
|
||||||
|
waitingClose.RemoteCommitment.CommitFee,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report the remote pending commit if any.
|
// Report the remote pending commit if any.
|
||||||
@ -2826,7 +2834,9 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
|
|||||||
default:
|
default:
|
||||||
hash := remoteCommitDiff.Commitment.CommitTx.TxHash()
|
hash := remoteCommitDiff.Commitment.CommitTx.TxHash()
|
||||||
commitments.RemotePendingTxid = hash.String()
|
commitments.RemotePendingTxid = hash.String()
|
||||||
|
commitments.RemoteCommitFeeSat = uint64(
|
||||||
|
remoteCommitDiff.Commitment.CommitFee,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
channel := &lnrpc.PendingChannelsResponse_PendingChannel{
|
channel := &lnrpc.PendingChannelsResponse_PendingChannel{
|
||||||
|
Loading…
Reference in New Issue
Block a user