added inventory message types
This commit is contained in:
parent
d7826a4d43
commit
4f6090cebf
1 changed files with 5 additions and 0 deletions
|
@ -157,6 +157,11 @@ func (m *Message) decodePayload(r io.Reader) error {
|
||||||
if err := p.Decode(tr); err != nil {
|
if err := p.Decode(tr); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
case cmdInv:
|
||||||
|
p = payload.Inventories{}
|
||||||
|
if err := p.Decode(tr); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown command to decode: %s", m.commandType())
|
return fmt.Errorf("unknown command to decode: %s", m.commandType())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue