• Levin Zimmermann's avatar
    go/neo/proto: Update msgcode increment logic to new protocol · c63f086a
    Levin Zimmermann authored
    In pre-msgpack protocol, the msgcode increment logic is like this:
    
    Notify 	 add +1 to next msgcode
    Request  add +0 to next msgcode   (next msg is answer & should therefore be the same)
    Answer 	 add +1 to next msgcode
    
    ('Answer' msgcode is adjusted by 'AnswerBit')
    
    In post-msgpack protocol, the logic is a bit different:
    
    Notify 	 add +1 to next msgcode
    Request  add +0 to next msgcode   (next msg is answer & should therefore be the same)
    Answer 	 add +2 to next msgcode
    
    So here we produce gaps after Request/Answer pairs.
    c63f086a
zproto-marshal.go 270 KB