lnrpc+rpcserver+lncli: rename RPC fields to previous JSON name

This commit is contained in:
Oliver Gugger
2020-02-12 16:13:07 +01:00
parent 3a5348ea8b
commit 9aff896b10
5 changed files with 671 additions and 671 deletions

View File

@@ -58,7 +58,7 @@ type Utxo struct {
// printed in base64. // printed in base64.
func NewUtxoFromProto(utxo *lnrpc.Utxo) *Utxo { func NewUtxoFromProto(utxo *lnrpc.Utxo) *Utxo {
return &Utxo{ return &Utxo{
Type: utxo.Type, Type: utxo.AddressType,
Address: utxo.Address, Address: utxo.Address,
AmountSat: utxo.AmountSat, AmountSat: utxo.AmountSat,
PkScript: utxo.PkScript, PkScript: utxo.PkScript,

File diff suppressed because it is too large Load Diff

View File

@@ -819,7 +819,7 @@ service Lightning {
message Utxo { message Utxo {
/// The type of address /// The type of address
AddressType type = 1; AddressType address_type = 1;
/// The address /// The address
string address = 2; string address = 2;
@@ -2910,7 +2910,7 @@ message ChannelFeeReport {
uint64 chan_id = 5 [jstype = JS_STRING]; uint64 chan_id = 5 [jstype = JS_STRING];
/// The channel that this fee report belongs to. /// The channel that this fee report belongs to.
string chan_point = 1; string channel_point = 1;
/// The base fee charged regardless of the number of milli-satoshis sent. /// The base fee charged regardless of the number of milli-satoshis sent.
int64 base_fee_msat = 2; int64 base_fee_msat = 2;

View File

@@ -2192,7 +2192,7 @@
"format": "uint64", "format": "uint64",
"description": "/ The short channel id that this fee report belongs to." "description": "/ The short channel id that this fee report belongs to."
}, },
"chan_point": { "channel_point": {
"type": "string", "type": "string",
"description": "/ The channel that this fee report belongs to." "description": "/ The channel that this fee report belongs to."
}, },
@@ -4196,7 +4196,7 @@
"lnrpcUtxo": { "lnrpcUtxo": {
"type": "object", "type": "object",
"properties": { "properties": {
"type": { "address_type": {
"$ref": "#/definitions/lnrpcAddressType", "$ref": "#/definitions/lnrpcAddressType",
"title": "/ The type of address" "title": "/ The type of address"
}, },

View File

@@ -943,7 +943,7 @@ func (r *rpcServer) ListUnspent(ctx context.Context,
} }
utxoResp := lnrpc.Utxo{ utxoResp := lnrpc.Utxo{
Type: addrType, AddressType: addrType,
AmountSat: int64(utxo.Value), AmountSat: int64(utxo.Value),
PkScript: hex.EncodeToString(utxo.PkScript), PkScript: hex.EncodeToString(utxo.PkScript),
Outpoint: outpoint, Outpoint: outpoint,
@@ -5141,11 +5141,11 @@ func (r *rpcServer) FeeReport(ctx context.Context,
// TODO(roasbeef): also add stats for revenue for each channel // TODO(roasbeef): also add stats for revenue for each channel
feeReports = append(feeReports, &lnrpc.ChannelFeeReport{ feeReports = append(feeReports, &lnrpc.ChannelFeeReport{
ChanId: chanInfo.ChannelID, ChanId: chanInfo.ChannelID,
ChanPoint: chanInfo.ChannelPoint.String(), ChannelPoint: chanInfo.ChannelPoint.String(),
BaseFeeMsat: int64(edgePolicy.FeeBaseMSat), BaseFeeMsat: int64(edgePolicy.FeeBaseMSat),
FeePerMil: int64(feeRateFixedPoint), FeePerMil: int64(feeRateFixedPoint),
FeeRate: feeRate, FeeRate: feeRate,
}) })
return nil return nil