feat: Waku v2 bridge

Issue #12610
This commit is contained in:
Michal Iskierko
2023-11-12 13:29:38 +01:00
parent 56e7bd01ca
commit 6d31343205
6716 changed files with 1982502 additions and 5891 deletions

25
vendor/github.com/anacrolix/torrent/bencode/bytes.go generated vendored Normal file
View File

@@ -0,0 +1,25 @@
package bencode
import (
"errors"
)
type Bytes []byte
var (
_ Unmarshaler = (*Bytes)(nil)
_ Marshaler = (*Bytes)(nil)
_ Marshaler = Bytes{}
)
func (me *Bytes) UnmarshalBencode(b []byte) error {
*me = append([]byte(nil), b...)
return nil
}
func (me Bytes) MarshalBencode() ([]byte, error) {
if len(me) == 0 {
return nil, errors.New("marshalled Bytes should not be zero-length")
}
return me, nil
}