Skip to content

Commit

Permalink
rpcserver: Add script version to gettxout.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGruffins committed May 9, 2021
1 parent 4e0be8d commit 478a8da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/rpcserver/rpcserver.go
Expand Up @@ -3580,6 +3580,7 @@ func handleGetTxOut(_ context.Context, s *Server, cmd interface{}) (interface{},
ReqSigs: int32(reqSigs),
Type: scriptClass.String(),
Addresses: addresses,
Version: scriptVersion,
},
Coinbase: isCoinbase,
}
Expand Down
1 change: 1 addition & 0 deletions internal/rpcserver/rpcserverhelp.go
Expand Up @@ -132,6 +132,7 @@ var helpDescsEnUS = map[string]string{
"scriptpubkeyresult-type": "The type of the script (e.g. 'pubkeyhash')",
"scriptpubkeyresult-addresses": "The Decred addresses associated with this script",
"scriptpubkeyresult-commitamt": "The ticket commitment value if the script is for a staking commitment",
"scriptpubkeyresult-version": "The script version",

// Vout help.
"vout-value": "The amount in DCR",
Expand Down
1 change: 1 addition & 0 deletions rpc/jsonrpc/types/chainsvrresults.go
Expand Up @@ -582,6 +582,7 @@ type ScriptPubKeyResult struct {
Type string `json:"type"`
Addresses []string `json:"addresses,omitempty"`
CommitAmt *float64 `json:"commitamt,omitempty"`
Version uint16 `json:"version"`
}

// ScriptSig models a signature script. It is defined separately since it only
Expand Down

0 comments on commit 478a8da

Please sign in to comment.