perone / protocoin

A pure Python Bitcoin protocol implementation
http://protocoin.readthedocs.org/
BSD 4-Clause "Original" or "Old" License
98 stars 34 forks source link

All message objects can now convert themselves to their binary representation #20

Closed bmuller closed 8 years ago

bmuller commented 9 years ago

This simply removes the code necessary to serialize a message from the connection client to a base SerializableMessage class. This means that you can now do something like this:

bin_message = VerAck().get_message()

for any of the message types. This is the final piece necessary to separate the socket interaction from actual serialization/deserialization.

One note: Part of this does remove the empty handle_send_message in the Client class. This functionality can easily be added to any class that extends the Client class by just overriding the send_message method to do whatever used to be done in that method.

bmuller commented 9 years ago

Let me know if there's anything I can do to help make this easier to merge. Thanks!

perone commented 9 years ago

Hi Brian, sorry the delay, I just need you to check the docs and see if the examples are still ok and if there is something that need to be changed in the docs.

bmuller commented 9 years ago

Sure - make sense. Let me know if you'd like me to go through the docs and submit any necessary updates as a part of this PR.

Also - on a side note (and feel free to take this offline by emailing me at the address listed on my profile page) - I've got the code necessary to create a new Tx object that can be sent on the network. Any interest in including that in protocoin?

perone commented 9 years ago

If this is not much to ask, it will help a lot, so you can submit changes in this same PR. Sure I'm interested in the Tx object, I just don't have much time in the next weeks to check this because I'm a little busy but I'm certainly interested.

bmuller commented 9 years ago

Docs updated in d61d9d0. I read through them - I think that's the only change necessary.

bmuller commented 9 years ago

Also - I'd like to get some tests in the repo. Are those things that you think could be either (1) easily merged or (2) something that you'd be willing to give me commit access to the repo for?

bmuller commented 9 years ago

Hey - just wanted to check on these and other PR's. Any chance of getting commit access to the repo? I have a super strong aversion to just forking code to create new projects - but I'd love to see this existing solid code backed by tests, a bit more pep8 compliance, and able to provide full support for creating transactions, etc. My preference (best to worst) would be direct commit access, PR's with general short review -> merge times, or fork + new project. Some of these PR's are holding me back on other projects - which is reason I'm asking. Thanks so much for creating Protocoin and for making it open source!