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:
parent
ea956f1ffc
commit
14f6a19835
6 changed files with 33 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue