stake: Fix CheckSSRtx function comment.

This updates the CheckSSRtx function comment to refer to the correct
output indexes from the input ticket transaction.  It also updates the
comment to refer to SSRtx outputs rather than SSGen outputs.
This commit is contained in:
Ryan Staudt 2021-06-12 05:54:39 -05:00 committed by Dave Collins
parent a89f1847bc
commit d4d7daa07c

View File

@ -1084,17 +1084,19 @@ func IsSSGen(tx *wire.MsgTx, isTreasuryEnabled bool) bool {
// valid.
//
// SSRtx transactions are specified as below.
//
// Inputs:
// SStx-tagged output [index 0]
// [index 0] SStx-tagged output
//
// Outputs:
// SSGen-tagged output to address from SStx-tagged output's tx index output 1
// [index 0]
// SSGen-tagged output to address from SStx-tagged output's tx index output 2
// [index 1]
// ...
// SSGen-tagged output to address from SStx-tagged output's tx index output
// MaxInputsPerSStx [index MaxOutputsPerSSRtx - 1]
// [index 0] SSRtx-tagged output to the first payment commitment address from
// SStx-tagged output's tx (output index 1)
// [index 1] SSRtx-tagged output to the second payment commitment address from
// SStx-tagged output's tx (output index 3)
// ...
// [index MaxOutputsPerSSRtx - 1] SSRtx-tagged output to the last payment
// commitment address from SStx-tagged output's tx index output (output
// index MaxInputsPerSStx - 1)
func CheckSSRtx(tx *wire.MsgTx) error {
// Check to make sure there is the correct number of inputs.
if len(tx.TxIn) != NumInputsPerSSRtx {