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

Use bn.js eq and lt instead of cmp #254

Merged
merged 1 commit into from Feb 1, 2018
Merged

Use bn.js eq and lt instead of cmp #254

merged 1 commit into from Feb 1, 2018

Conversation

axic
Copy link
Member

@axic axic commented Jan 30, 2018

Depends on #159.

@axic
Copy link
Member Author

axic commented Jan 30, 2018

@holgerd77 should be ready to merge

@axic axic mentioned this pull request Feb 1, 2018
Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok.

},
EQ: function (a, b, runState) {
return new BN(a.cmp(b) === 0 ? 1 : 0)
return new BN(a.eq(b) ? 1 : 0)
Copy link
Member

Choose a reason for hiding this comment

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

These look good.

@@ -13,7 +13,7 @@ module.exports = function (opts) {
results.gasUsed = new BN(fees.identityGas.v)
results.gasUsed.iadd(new BN(fees.identityWordGas.v).imuln(Math.ceil(data.length / 32)))

if (opts.gasLimit.cmp(results.gasUsed) === -1) {
if (opts.gasLimit.lt(results.gasUsed)) {
Copy link
Member

Choose a reason for hiding this comment

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

These look good as well.

@holgerd77 holgerd77 merged commit 8056512 into master Feb 1, 2018
@holgerd77 holgerd77 deleted the use-bn-eq branch February 1, 2018 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants