1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Stop headsync with certain peer ids

This commit is contained in:
mcrakhman 2024-02-14 18:16:03 +01:00
parent ea956f1ffc
commit 14f6a19835
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
6 changed files with 33 additions and 3 deletions

View file

@ -6,6 +6,9 @@ import (
"testing"
"time"
"github.com/anyproto/go-chash"
"github.com/stretchr/testify/require"
accountService "github.com/anyproto/any-sync/accountservice"
"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/app/ocache"
@ -23,8 +26,6 @@ import (
"github.com/anyproto/any-sync/net/pool"
"github.com/anyproto/any-sync/nodeconf"
"github.com/anyproto/any-sync/testutil/accounttest"
"github.com/anyproto/go-chash"
"github.com/stretchr/testify/require"
)
//
@ -282,6 +283,10 @@ func (n noOpSyncer) Close() error {
type mockTreeSyncer struct {
}
func (m mockTreeSyncer) ShouldSync(peerId string) bool {
return false
}
func (m mockTreeSyncer) Init(a *app.App) (err error) {
return nil
}