Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/pullsync/pullsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ func (s *Syncer) Sync(ctx context.Context, peer swarm.Address, bin uint8, start
if cac.Valid(chunk) {
go s.unwrap(chunk)
} else if chunk, err := soc.FromChunk(chunk); err == nil {
addr, err := chunk.Address()
if err != nil {
chunkErr = errors.Join(chunkErr, err)
continue
}
s.logger.Debug("sync gsoc", "peer_address", peer, "chunk_address", addr, "wrapped_chunk_address", chunk.WrappedChunk().Address())
s.gsocHandler(chunk)
} else {
s.logger.Debug("invalid cac/soc chunk", "error", swarm.ErrInvalidChunk, "peer_address", peer, "chunk", chunk)
Expand Down
9 changes: 7 additions & 2 deletions pkg/pushsync/pushsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"github.com/ethersphere/bee/v2/pkg/pushsync/pb"
"github.com/ethersphere/bee/v2/pkg/skippeers"
"github.com/ethersphere/bee/v2/pkg/soc"
storage "github.com/ethersphere/bee/v2/pkg/storage"
"github.com/ethersphere/bee/v2/pkg/storage"
"github.com/ethersphere/bee/v2/pkg/swarm"
"github.com/ethersphere/bee/v2/pkg/topology"
"github.com/ethersphere/bee/v2/pkg/tracing"
opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
olog "github.com/opentracing/opentracing-go/log"
)
Expand Down Expand Up @@ -233,6 +233,11 @@ func (ps *PushSync) handler(ctx context.Context, p p2p.Peer, stream p2p.Stream)
if cac.Valid(chunk) {
go ps.unwrap(chunk)
} else if chunk, err := soc.FromChunk(chunk); err == nil {
addr, err := chunk.Address()
if err != nil {
return err
}
ps.logger.Debug("handle gsoc", "peer_address", p.Address, "chunk_address", addr, "wrapped_chunk_address", chunk.WrappedChunk().Address())
ps.gsocHandler(chunk)
} else {
return swarm.ErrInvalidChunk
Expand Down
Loading