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

47
vendor/github.com/anacrolix/missinggo/multiless.go generated vendored Normal file
View File

@@ -0,0 +1,47 @@
package missinggo
type (
SameLessFunc func() (same, less bool)
MultiLess struct {
ok bool
less bool
}
)
func (me *MultiLess) Less() bool {
return me.ok && me.less
}
func (me *MultiLess) Final() bool {
if !me.ok {
panic("undetermined")
}
return me.less
}
func (me *MultiLess) FinalOk() (left, ok bool) {
return me.less, me.ok
}
func (me *MultiLess) Next(f SameLessFunc) {
if me.ok {
return
}
same, less := f()
if same {
return
}
me.ok = true
me.less = less
}
func (me *MultiLess) StrictNext(same, less bool) {
if me.ok {
return
}
me.Next(func() (bool, bool) { return same, less })
}
func (me *MultiLess) NextBool(l, r bool) {
me.StrictNext(l == r, l)
}