sizeHint method
If possible give a hint of expected size of the encoding.
This method is used inside default implementation of encode
to avoid re-allocations.
Implementation
@override
int sizeHint(PeerInfo<H, N> value) {
int size = 0;
size += StrCodec.codec.sizeHint(value.peerId);
size += StrCodec.codec.sizeHint(value.roles);
size += hashCodec.sizeHint(value.bestHash);
size += numberCodec.sizeHint(value.bestNumber);
return size;
}