lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg

This commit is contained in:
Conner Fromknecht 2019-02-11 13:02:25 -08:00
parent 3fa9d81a41
commit 34e36e9daa
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
6 changed files with 569 additions and 569 deletions

View File

@ -20,7 +20,7 @@ type Utxo struct {
Type lnrpc.AddressType `json:"address_type"`
Address string `json:"address"`
AmountSat int64 `json:"amount_sat"`
ScriptPubkey string `json:"script_pubkey"`
PkScript string `json:"pk_script"`
OutPoint OutPoint `json:"outpoint"`
Confirmations int64 `json:"confirmations"`
}
@ -33,7 +33,7 @@ func NewUtxoFromProto(utxo *lnrpc.Utxo) *Utxo {
Type: utxo.Type,
Address: utxo.Address,
AmountSat: utxo.AmountSat,
ScriptPubkey: utxo.ScriptPubkey,
PkScript: utxo.PkScript,
OutPoint: NewOutPointFromProto(utxo.Outpoint),
Confirmations: utxo.Confirmations,
}

File diff suppressed because it is too large Load Diff

View File

@ -686,8 +686,8 @@ message Utxo {
/// The value of the unspent coin in satoshis
int64 amount_sat = 3 [json_name = "amount_sat"];
/// The scriptpubkey in hex
string script_pubkey = 4 [json_name = "script_pubkey"];
/// The pkscript in hex
string pk_script = 4 [json_name = "pk_script"];
/// The outpoint in format txid:n
OutPoint outpoint = 5 [json_name = "outpoint"];

View File

@ -3068,9 +3068,9 @@
"format": "int64",
"title": "/ The value of the unspent coin in satoshis"
},
"script_pubkey": {
"pk_script": {
"type": "string",
"title": "/ The scriptpubkey in hex"
"title": "/ The pkscript in hex"
},
"outpoint": {
"$ref": "#/definitions/lnrpcOutPoint",

View File

@ -1320,7 +1320,7 @@ func (n *NetworkHarness) sendCoins(ctx context.Context, amt btcutil.Amount,
// Assert that the lone unconfirmed utxo contains the same
// pkscript as the output generated above.
pkScriptStr := resp.Utxos[0].ScriptPubkey
pkScriptStr := resp.Utxos[0].PkScript
if strings.Compare(pkScriptStr, expPkScriptStr) != 0 {
return fmt.Errorf("pkscript mismatch, want: %s, "+
"found: %s", expPkScriptStr, pkScriptStr)

View File

@ -731,7 +731,7 @@ func (r *rpcServer) ListUnspent(ctx context.Context,
utxoResp := lnrpc.Utxo{
Type: addrType,
AmountSat: int64(utxo.Value),
ScriptPubkey: hex.EncodeToString(utxo.PkScript),
PkScript: hex.EncodeToString(utxo.PkScript),
Outpoint: outpoint,
Confirmations: utxo.Confirmations,
}