Skip to content
  • Olaoluwa Osuntokun's avatar
    48abfdf8
    BIP0144+wire: add a MessageEncoding variant for serialization/deserialization · 48abfdf8
    Olaoluwa Osuntokun authored
    This commit modifies the existing wire.Message interface to introduce a
    new MessageEncoding variant which dictates the exact encoding to be
    used when serializing and deserializing messages. Such an option is now
    necessary due to the segwit soft-fork package, as btcd will need to be
    able to optionally encode transactions/blocks without witness data to
    un-upgraded peers.
    
    Two new functions have been introduced: ReadMessageWithEncodingN and
    WriteMessageWithEncodingN which wrap BtcDecode/BtcEncode with the
    desired encoding format.
    48abfdf8
    BIP0144+wire: add a MessageEncoding variant for serialization/deserialization
    Olaoluwa Osuntokun authored
    This commit modifies the existing wire.Message interface to introduce a
    new MessageEncoding variant which dictates the exact encoding to be
    used when serializing and deserializing messages. Such an option is now
    necessary due to the segwit soft-fork package, as btcd will need to be
    able to optionally encode transactions/blocks without witness data to
    un-upgraded peers.
    
    Two new functions have been introduced: ReadMessageWithEncodingN and
    WriteMessageWithEncodingN which wrap BtcDecode/BtcEncode with the
    desired encoding format.
Loading