mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-30 09:40:24 +02:00
lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg
This commit is contained in:
parent
3fa9d81a41
commit
34e36e9daa
@ -20,7 +20,7 @@ type Utxo struct {
|
|||||||
Type lnrpc.AddressType `json:"address_type"`
|
Type lnrpc.AddressType `json:"address_type"`
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
AmountSat int64 `json:"amount_sat"`
|
AmountSat int64 `json:"amount_sat"`
|
||||||
ScriptPubkey string `json:"script_pubkey"`
|
PkScript string `json:"pk_script"`
|
||||||
OutPoint OutPoint `json:"outpoint"`
|
OutPoint OutPoint `json:"outpoint"`
|
||||||
Confirmations int64 `json:"confirmations"`
|
Confirmations int64 `json:"confirmations"`
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ func NewUtxoFromProto(utxo *lnrpc.Utxo) *Utxo {
|
|||||||
Type: utxo.Type,
|
Type: utxo.Type,
|
||||||
Address: utxo.Address,
|
Address: utxo.Address,
|
||||||
AmountSat: utxo.AmountSat,
|
AmountSat: utxo.AmountSat,
|
||||||
ScriptPubkey: utxo.ScriptPubkey,
|
PkScript: utxo.PkScript,
|
||||||
OutPoint: NewOutPointFromProto(utxo.Outpoint),
|
OutPoint: NewOutPointFromProto(utxo.Outpoint),
|
||||||
Confirmations: utxo.Confirmations,
|
Confirmations: utxo.Confirmations,
|
||||||
}
|
}
|
||||||
|
1122
lnrpc/rpc.pb.go
1122
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -686,8 +686,8 @@ message Utxo {
|
|||||||
/// The value of the unspent coin in satoshis
|
/// The value of the unspent coin in satoshis
|
||||||
int64 amount_sat = 3 [json_name = "amount_sat"];
|
int64 amount_sat = 3 [json_name = "amount_sat"];
|
||||||
|
|
||||||
/// The scriptpubkey in hex
|
/// The pkscript in hex
|
||||||
string script_pubkey = 4 [json_name = "script_pubkey"];
|
string pk_script = 4 [json_name = "pk_script"];
|
||||||
|
|
||||||
/// The outpoint in format txid:n
|
/// The outpoint in format txid:n
|
||||||
OutPoint outpoint = 5 [json_name = "outpoint"];
|
OutPoint outpoint = 5 [json_name = "outpoint"];
|
||||||
|
@ -3068,9 +3068,9 @@
|
|||||||
"format": "int64",
|
"format": "int64",
|
||||||
"title": "/ The value of the unspent coin in satoshis"
|
"title": "/ The value of the unspent coin in satoshis"
|
||||||
},
|
},
|
||||||
"script_pubkey": {
|
"pk_script": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "/ The scriptpubkey in hex"
|
"title": "/ The pkscript in hex"
|
||||||
},
|
},
|
||||||
"outpoint": {
|
"outpoint": {
|
||||||
"$ref": "#/definitions/lnrpcOutPoint",
|
"$ref": "#/definitions/lnrpcOutPoint",
|
||||||
|
@ -1320,7 +1320,7 @@ func (n *NetworkHarness) sendCoins(ctx context.Context, amt btcutil.Amount,
|
|||||||
|
|
||||||
// Assert that the lone unconfirmed utxo contains the same
|
// Assert that the lone unconfirmed utxo contains the same
|
||||||
// pkscript as the output generated above.
|
// pkscript as the output generated above.
|
||||||
pkScriptStr := resp.Utxos[0].ScriptPubkey
|
pkScriptStr := resp.Utxos[0].PkScript
|
||||||
if strings.Compare(pkScriptStr, expPkScriptStr) != 0 {
|
if strings.Compare(pkScriptStr, expPkScriptStr) != 0 {
|
||||||
return fmt.Errorf("pkscript mismatch, want: %s, "+
|
return fmt.Errorf("pkscript mismatch, want: %s, "+
|
||||||
"found: %s", expPkScriptStr, pkScriptStr)
|
"found: %s", expPkScriptStr, pkScriptStr)
|
||||||
|
@ -731,7 +731,7 @@ func (r *rpcServer) ListUnspent(ctx context.Context,
|
|||||||
utxoResp := lnrpc.Utxo{
|
utxoResp := lnrpc.Utxo{
|
||||||
Type: addrType,
|
Type: addrType,
|
||||||
AmountSat: int64(utxo.Value),
|
AmountSat: int64(utxo.Value),
|
||||||
ScriptPubkey: hex.EncodeToString(utxo.PkScript),
|
PkScript: hex.EncodeToString(utxo.PkScript),
|
||||||
Outpoint: outpoint,
|
Outpoint: outpoint,
|
||||||
Confirmations: utxo.Confirmations,
|
Confirmations: utxo.Confirmations,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user