• Levin Zimmermann's avatar
    go/neo/proto: Update msgcode increment logic to new protocol · 8a7fe88d
    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.
    8a7fe88d
zproto-marshal.go 271 KB