negentropy: fuzz testing, move accumulator to vector package.

This commit is contained in:
fiatjaf
2024-09-20 10:56:15 -03:00
parent e9e96be95e
commit 9813d1776f
13 changed files with 205 additions and 68 deletions

View File

@@ -117,10 +117,10 @@ func writeVarInt(w *StringHexWriter, n int) {
return
}
w.WriteBytes(encodeVarInt(n))
w.WriteBytes(EncodeVarInt(n))
}
func encodeVarInt(n int) []byte {
func EncodeVarInt(n int) []byte {
if n == 0 {
return []byte{0}
}