conformal/btcwire — pull request #18 by tuxcanfly (2014-04-24 21:00:07+00:00)
Title: Implement alert message serialize/deserialize

Refs #11

I've implemented the new struct `Alert` and functions `NewAlert`, `NewAlertFromPayload`, `Serialize`, `Deserialize`.

I was able to verify that deserialization works for the example given at:

https://en.bitcoin.it/wiki/Protocol_specification#alert

Not sure if we should have this example hardcoded in the tests.

Still working on a few things like updating `NewMsgAlert`, `BtcDecode` to load the `Alert` and fixing the coverage.

I had to add a few functions like `readIntSet`, `readStringSet`, `writeIntSet`, `writeStringSet` but not sure if this is the best way. Is this where `reflect` comes into the picture?