• Levin Zimmermann's avatar
    go/neo/proto: Update msgcode increment logic to new protocol · 27a78346
    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.
    27a78346
protogen.go 51.2 KB