Skip to content

Conversation

@dcousens
Copy link
Contributor

This pull request does two things.

  • It adds the magic protocol constant to the networks object, renaming magicPrefix to messagePrefix (with 1.5.x compatibility added for now)
  • It changes estimateFee to use a new function Transaction.prototype.byteLength which is the size calculation functionality extracted out of Transaction.prototype.toBuffer, this saves unnecessary building of a Buffer in estimateFee.

All changes are backwards compatible (excepting 5b4e762), and could be directly applied to 1.5.x via cherry pick.

@dcousens
Copy link
Contributor Author

@p2pmining and @rubensayshi ACK appreciated if you could :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 99.17% when pulling 063b036 on magic into 886d38e on master.

@dcousens
Copy link
Contributor Author

ping @jprichardson

@SerafinTech
Copy link

ACK

1 similar comment
@rubensayshi
Copy link
Contributor

ACK

@jprichardson
Copy link
Member

ACK. But I'm still unsure why you do === undefined instead of the == to leverage type coercian to catch null too...

@dcousens
Copy link
Contributor Author

@jprichardson what semantic meaning would a null have? In any case, the function will hopefully be gone soon, so this will just be a bike shed :)

dcousens added a commit that referenced this pull request Mar 16, 2015
@dcousens dcousens merged commit 01036ee into master Mar 16, 2015
@dcousens dcousens deleted the magic branch March 16, 2015 21:01
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.

6 participants