lnrpc: add htlc index to ListChannels pending htlcs
This commit is contained in:
4 files changed
+783
-764
No files matched your search
+774
-764
File diff suppressed because it is too large.
Load diff
@@ -1006,6 +1006,9 @@ message HTLC {
|
|||||||
int64 amount = 2;
|
int64 amount = 2;
|
||||||
bytes hash_lock = 3;
|
bytes hash_lock = 3;
|
||||||
uint32 expiration_height = 4;
|
uint32 expiration_height = 4;
|
||||||
|
|
||||||
|
// Index identifying the htlc on the channel.
|
||||||
|
uint64 htlc_index = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CommitmentType {
|
enum CommitmentType {
|
||||||
|
|||||||
@@ -3813,6 +3813,11 @@
|
|||||||
"expiration_height": {
|
"expiration_height": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"htlc_index": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64",
|
||||||
|
"description": "Index identifying the htlc on the channel."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3577,6 +3577,7 @@ func createRPCOpenChannel(r *rpcServer, graph *channeldb.ChannelGraph,
|
|||||||
Amount: int64(htlc.Amt.ToSatoshis()),
|
Amount: int64(htlc.Amt.ToSatoshis()),
|
||||||
HashLock: rHash[:],
|
HashLock: rHash[:],
|
||||||
ExpirationHeight: htlc.RefundTimeout,
|
ExpirationHeight: htlc.RefundTimeout,
|
||||||
|
HtlcIndex: htlc.HtlcIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the Pending Htlc Amount to UnsettledBalance field.
|
// Add the Pending Htlc Amount to UnsettledBalance field.
|
||||||
|
|||||||
Reference in new issue
Block a user