Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions blockchain/stake/treasury.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ func CheckTAdd(tx *wire.MsgTx) error {

// All output scripts must be version 0 and non-empty.
const consensusScriptVer = 0
for txOutIdx := range tx.TxOut {
txOut := tx.TxOut[txOutIdx]
for txOutIdx, txOut := range tx.TxOut {
if txOut.Version != consensusScriptVer {
str := fmt.Sprintf("treasury add transaction output %d script "+
"version is %d instead of %d", txOutIdx, txOut.Version,
Expand Down
4 changes: 2 additions & 2 deletions blockchain/stake/treasury_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func treasurySpendSignature(sig, pubKey []byte) []byte {
}

// fakeTreasurySpendSignature returns a signature script that is valid enough to
// pass all checks, but would fail if actually checked. This identification
// pass all checks, but would fail if actually checked. The identification
// funcs in this package do not verify signatures, so valid signatures are not
// required for the tests.
func fakeTreasurySpendSignature() []byte {
Expand Down Expand Up @@ -183,7 +183,7 @@ func TestTreasuryIsFunctions(t *testing.T) {
tests := []struct {
name string // test description
tx *wire.MsgTx // transaction to test
treasuryAdd bool // expected check is treasury add
treasuryAdd bool // expected is treasury add
treasuryBase bool // expected is treasury base
treasurySpend bool // expected is treasury spend
}{{
Expand Down