• Kirill Smelkov's avatar
    encoder: Fix list wrt protocol version · 33d1926f
    Kirill Smelkov authored
    - we can use EMPTY_LIST only if protocol >= 1
    
    Also: since we are now using EMPTY_LIST only optionally, it is logical
    to switch to
    
    	MARK + ... + LIST
    
    instead of
    
    	EMPTY_LIST (or MARK + LIST @proto=0) + MARK + ... + APPENDS
    
    which is at least 1 byte longer.
    
    For the reference - APPENDS is also from protocol 1, while LIST is from
    protocol 0.
    33d1926f
encode.go 9.63 KB