Skip to content

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

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

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

Conversation

@Yzyzzzz23
Copy link
Contributor

No description provided.

common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
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

common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Contributor

Choose a reason for hiding this comment

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

above all

common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Contributor

Choose a reason for hiding this comment

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

above all

common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
//common.BytesToAddress([]byte{3}): &ripemd160hash{},
Copy link
Contributor

Choose a reason for hiding this comment

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

above all

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

Choose a reason for hiding this comment

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

above all

}
err = l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, ""})
if err != nil {
return
Copy link
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