// NumBytes returns the number of bytes it will take to serialize the full
// payload. Depending on the payload type, this may include some additional
// signalling bytes.
NumBytes returns the number of bytes it will take to serialize the full
payload. Depending on the payload type, this may include some additional
signalling bytes.
// NumBytes returns the number of bytes it will take to serialize the full // payload . Depending on the payload type this may include some additional // signalling bytes .
func (hp *HopPayload) NumBytes() int {
	size := len(hp.Payload) + HMACSize
	if hp.Type == PayloadTLV {
		payloadSize := len(hp.Payload)
		size += int(wire.VarIntSerializeSize(uint64(payloadSize)))
	}
	return size
}
func ( hp * HopPayload ) NumBytes ( ) int { size := len ( hp . Payload ) + HMACSize if hp . Type == PayloadTLV { payloadSize := len ( hp . Payload ) size += int ( wire . VarIntSerializeSize ( uint64 ( payloadSize ) ) ) } return size }
NumBytes returns the number of bytes it will take to serialize the full
payload.
NumBytes returns the number of bytes it will take to serialize the full payload .
// The base size is the size of the raw payload, and the size of the // HMAC. // If this is the new TLV format, then we'll also accumulate the number // of bytes that it would take to encode the size of the payload.