Closed braydonf closed 9 years ago
Amazing work, great!
There are a few nits on the tests names but I'd approve this PR as is. I'll review it more in-deep this afternoon
Two questions:
fromObject
methods on the message command constructors, since they nolonger seem necesssary ?bitcore.Networks.defaultNetwork.networkMagic.readUInt32LE(0)
?readUINt32LE
, right? I'm slightly more concerned about every message doing magicNumber = bitcore.Networks....
new Message()
can be used for those purposes is most (all currently) cases. For JSON it would be fromJSON()
that would then call new Message(objectFromJSON)
.Edit: Took a look at implementing #2 And think the current solution is better.
LGTM, let's merge this
Great work in general, left some small comments. Please fix/reply and I'll be happy to merge this :)
Messages are now built with a factory that can be customized with an options argument to
Messages
, for example:Additionally, individual message constructors have been organized into separate files.
Peer and Pool now have options defined as an object to avoid needing to pass in "null, null, true" as arguments, for example:
listen()
method to Pool to enable remote peers to be added to the pool upon incoming connections, enables bitcore to bitcore node connectivity.