Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: Make more validate about the MsgCreateValidator in CollectStdTxs #853

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

chengwenxi
Copy link
Contributor

@chengwenxi chengwenxi commented Dec 19, 2018

@haifengxi haifengxi requested review from HaoyangLiu, MrXJC and wukongcheng and removed request for HaoyangLiu December 19, 2018 10:18
var (
_ sdk.Tx = (*StdTx)(nil)

maxGasWanted = uint64((1 << 63) - 1)
Copy link
Contributor

@wukongcheng wukongcheng Dec 19, 2018

Choose a reason for hiding this comment

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

uint64((1 << 63) - 1) --> math.MaxInt64


if tx.Fee.Gas > maxGasWanted {
return sdk.ErrGasOverflow(fmt.Sprintf("invalid gas supplied; %d > %d", tx.Fee.Gas, maxGasWanted))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

change the tendermint to use uint64 for gas instead of int64

Copy link
Contributor

@wukongcheng wukongcheng left a comment

Choose a reason for hiding this comment

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

split the PR into 2 parts. The other one is for changing the tendermint to use uint64 for gas instead of int64

@chengwenxi
Copy link
Contributor Author

We have checked gas overflow in FeePreprocessHandler, so I removed the relevant commits.

@wukongcheng wukongcheng changed the title R4R: Merge PRs from Cosmos-SDK 0.28 R4R: Make more validate about the MsgCreateValidator in CollectStdTxs Dec 20, 2018
@wukongcheng wukongcheng merged commit bd5f4aa into irisnet:develop Dec 20, 2018
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.

3 participants