Skip to content

fix: Solve the code specification problem detected by golangci-lint.#31

Open
Yzyzzzz23 wants to merge 1 commit into
masterfrom
fix/golangci-lint
Open

fix: Solve the code specification problem detected by golangci-lint.#31
Yzyzzzz23 wants to merge 1 commit into
masterfrom
fix/golangci-lint

Conversation

@Yzyzzzz23
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread evm/contracts.go
common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why comment this code

Comment thread evm/contracts.go
common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above all

Comment thread evm/contracts.go
common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above all

Comment thread evm/contracts.go
common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above all

Comment thread evm/contracts.go
ripemd.Write(input)
return common.LeftPadBytes(ripemd.Sum(nil), 32), nil
}
//func (c *ripemd160hash) RequiredGas(input []byte) uint64 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above all

Comment thread evm/logger_json.go
}
err = l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, ""})
if err != nil {
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace by :

el := endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, ""}
if err != nil {
	el.Err = err.Error()
}
err = l.encoder.Encode(el)
if err != nil {
	return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants