From d4d7daa07cec3c78df6bd97e8da40b548bbbcbe7 Mon Sep 17 00:00:00 2001 From: Ryan Staudt Date: Sat, 12 Jun 2021 05:54:39 -0500 Subject: [PATCH] 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. --- blockchain/stake/staketx.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/blockchain/stake/staketx.go b/blockchain/stake/staketx.go index a65238a5..f59c8b6c 100644 --- a/blockchain/stake/staketx.go +++ b/blockchain/stake/staketx.go @@ -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 {