rpcserver: Add script version to gettxout.

This commit is contained in:
JoeGruff 2021-05-10 08:59:52 +09:00 committed by Dave Collins
parent 4e0be8d2fb
commit 98a74c6084
3 changed files with 3 additions and 0 deletions

View File

@ -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,
}

View File

@ -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",

View File

@ -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