From fd49640256bde811550d7e20893af4892bc52cb1 Mon Sep 17 00:00:00 2001 From: CRex15 Date: Tue, 28 Feb 2023 10:39:47 -0500 Subject: [PATCH] Add note to LabelTransaction TXID field The description for TXID in Label Transaction should include a note that, in the case of GRPC, the TXID needs to be passed in little-endian (reverse) byte order. A user passing the bytes in big-endian order is met with an error message stating that the transaction is not found in the wallet and no other information with which to troubleshoot. --- lnrpc/walletrpc/walletkit.pb.go | 3 ++- lnrpc/walletrpc/walletkit.proto | 3 ++- lnrpc/walletrpc/walletkit.swagger.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lnrpc/walletrpc/walletkit.pb.go b/lnrpc/walletrpc/walletkit.pb.go index e68cac65a..617aac7d3 100644 --- a/lnrpc/walletrpc/walletkit.pb.go +++ b/lnrpc/walletrpc/walletkit.pb.go @@ -3023,7 +3023,8 @@ type LabelTransactionRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The txid of the transaction to label. + // The txid of the transaction to label. Note: When using gRPC, the bytes + // must be in little-endian (reverse) order. Txid []byte `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` // The label to add to the transaction, limited to 500 characters. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` diff --git a/lnrpc/walletrpc/walletkit.proto b/lnrpc/walletrpc/walletkit.proto index 58c3b9e9c..e11bc07e0 100644 --- a/lnrpc/walletrpc/walletkit.proto +++ b/lnrpc/walletrpc/walletkit.proto @@ -982,7 +982,8 @@ message ListSweepsResponse { } message LabelTransactionRequest { - // The txid of the transaction to label. + // The txid of the transaction to label. Note: When using gRPC, the bytes + // must be in little-endian (reverse) order. bytes txid = 1; // The label to add to the transaction, limited to 500 characters. diff --git a/lnrpc/walletrpc/walletkit.swagger.json b/lnrpc/walletrpc/walletkit.swagger.json index d0f6f50a6..f118ecbe3 100644 --- a/lnrpc/walletrpc/walletkit.swagger.json +++ b/lnrpc/walletrpc/walletkit.swagger.json @@ -1525,7 +1525,7 @@ "txid": { "type": "string", "format": "byte", - "description": "The txid of the transaction to label." + "description": "The txid of the transaction to label. Note: When using gRPC, the bytes\nmust be in little-endian (reverse) order." }, "label": { "type": "string",