Skip to content

Conversation

@dcousens
Copy link
Contributor

A small enough PR, just some light fixes and cleanup before I submit the Script and Transaction refactor's.

I'll just inline some comments on the commits for anything not immediately obvious from the commit message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our use of BigInteger is non-mutating in this instance, so there is no reason in taking a clone initially. (see num = num.multiply(BASE).

dcousens added 7 commits May 31, 2014 15:05
Undefined is treated as zero if it ever gets to this point anyway, so no
value is added by having this default param here.

A test fixture to verify this behaviour is added.
The encode/decode functions are also now similar syntactically.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) when pulling 77d4325 on dcousens:ecneg into 13f95d4 on bitcoinjs:master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be necessary for parsing Script from binary data. Note it isn't used yet because all that code is currently in-lined inside Script.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not adding it only when it's started being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, in this case, it was more about completing the API.

weilu added a commit that referenced this pull request Jun 3, 2014
ECKey -D test and light cleanup
@weilu weilu merged commit c76d3ce into bitcoinjs:master Jun 3, 2014
@dcousens dcousens deleted the ecneg branch June 3, 2014 07:16
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