Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pushsync disabled for bootnode #3616

Merged
merged 7 commits into from Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/node/node.go
Expand Up @@ -946,7 +946,7 @@ func NewBee(interrupt chan struct{}, sysInterrupt chan os.Signal, addr string, p
pushSyncProtocolSpec := pushSyncProtocol.Protocol()
pullSyncProtocolSpec := pullSyncProtocol.Protocol()

if o.FullNodeMode {
if o.FullNodeMode && !o.BootnodeMode {
istae marked this conversation as resolved.
Show resolved Hide resolved
logger.Info("starting in full mode")
} else {
logger.Info("starting in light mode")
Expand Down
8 changes: 4 additions & 4 deletions pkg/pushsync/pushsync.go
Expand Up @@ -87,7 +87,7 @@ type PushSync struct {
tracer *tracing.Tracer
validStamp postage.ValidStampFn
signer crypto.Signer
isFullNode bool
includeSelf bool
istae marked this conversation as resolved.
Show resolved Hide resolved
warmupPeriod time.Time
skipList *peerSkipList
}
Expand All @@ -100,15 +100,15 @@ type receiptResult struct {
err error
}

func New(address swarm.Address, nonce []byte, streamer p2p.StreamerDisconnecter, storer storage.Putter, topology topology.Driver, tagger *tags.Tags, isFullNode bool, unwrap func(swarm.Chunk), validStamp postage.ValidStampFn, logger log.Logger, accounting accounting.Interface, pricer pricer.Interface, signer crypto.Signer, tracer *tracing.Tracer, warmupTime time.Duration) *PushSync {
func New(address swarm.Address, nonce []byte, streamer p2p.StreamerDisconnecter, storer storage.Putter, topology topology.Driver, tagger *tags.Tags, includeSelf bool, unwrap func(swarm.Chunk), validStamp postage.ValidStampFn, logger log.Logger, accounting accounting.Interface, pricer pricer.Interface, signer crypto.Signer, tracer *tracing.Tracer, warmupTime time.Duration) *PushSync {
ps := &PushSync{
address: address,
nonce: nonce,
streamer: streamer,
storer: storer,
topologyDriver: topology,
tagger: tagger,
isFullNode: isFullNode,
includeSelf: includeSelf,
unwrap: unwrap,
logger: logger.WithName(loggerName).Register(),
accounting: accounting,
Expand Down Expand Up @@ -351,7 +351,7 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, origin bo
}

var (
includeSelf = ps.isFullNode
includeSelf = ps.includeSelf
skipPeers = new(skippeers.List)
)

Expand Down