• Felix Lange's avatar
    eth, p2p: remove EncodeMsg from p2p.MsgWriter · eb0e7b1b
    Felix Lange authored
    ...and make it a top-level function instead.
    
    The original idea behind having EncodeMsg in the interface was that
    implementations might be able to encode RLP data to their underlying
    writer directly instead of buffering the encoded data. The encoder
    will buffer anyway, so that doesn't matter anymore.
    
    Given the recent problems with EncodeMsg (copy-pasted implementation
    bug) I'd rather implement once, correctly.
    eb0e7b1b
peer_test.go 7.08 KB