Skip to content

Commit 4372a80

Browse files
authored
Merge pull request #130 from ipfs/release/v0.5.2
docs(CHANGELOG): update for v0.5.2
2 parents 197722e + 8abdfce commit 4372a80

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# go-graphsync changelog
22

3+
# go-graphsync 0.5.2
4+
5+
Minor release resolves bugs in notification system
6+
7+
### Changelog
8+
9+
- github.com/ipfs/go-graphsync:
10+
- RegisterNetworkErrorListener should fire when there's an error connecting to the peer (#127) ([ipfs/go-graphsync#127](https://github.com/ipfs/go-graphsync/pull/127))
11+
- Permit multiple data subscriptions per original topic (#128) ([ipfs/go-graphsync#128](https://github.com/ipfs/go-graphsync/pull/128))
12+
- release: v0.5.1 (#123) ([ipfs/go-graphsync#123](https://github.com/ipfs/go-graphsync/pull/123))
13+
14+
### Contributors
15+
16+
| Contributor | Commits | Lines ± | Files Changed |
17+
|-------------|---------|---------|---------------|
18+
| dirkmc | 2 | +272/-185 | 10 |
19+
| Alex Cruikshank | 1 | +188/-110 | 12 |
20+
| Hannah Howard | 1 | +23/-6 | 3 |
21+
322
# go-graphsync 0.5.1
423

524
### Changelog

impl/graphsync_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,6 @@ func TestGraphsyncBlockListeners(t *testing.T) {
10431043
require.Equal(t, blockChainLength, blocksSent)
10441044
}
10451045

1046-
10471046
type gsTestData struct {
10481047
mn mocknet.Mocknet
10491048
ctx context.Context

notifications/data_subscriber.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package notifications
33
import "sync"
44

55
type TopicDataSubscriber struct {
6-
idMapLk sync.RWMutex
7-
data map[Topic][]TopicData
6+
idMapLk sync.RWMutex
7+
data map[Topic][]TopicData
88
Subscriber
99
}
1010

1111
// NewTopicDataSubscriber produces a subscriber that will transform
1212
// events and topics before passing them on to the given subscriber
1313
func NewTopicDataSubscriber(sub Subscriber) *TopicDataSubscriber {
1414
return &TopicDataSubscriber{
15-
Subscriber: sub,
16-
data: make(map[Topic][]TopicData),
15+
Subscriber: sub,
16+
data: make(map[Topic][]TopicData),
1717
}
1818
}
1919

notifications/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type EventTransform func(Event) Event
3636
// Notifee is a topic data subscriber plus a set of data you want to add to any topics subscribed to
3737
// (used to call SubscribeWithData to inject data when events for a given topic emit)
3838
type Notifee struct {
39-
Data TopicData
39+
Data TopicData
4040
Subscriber *TopicDataSubscriber
4141
}
4242

requestmanager/requestmanager.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import (
66
"fmt"
77
"sync/atomic"
88

9-
"github.com/ipfs/go-graphsync/listeners"
10-
"github.com/ipfs/go-graphsync/messagequeue"
11-
129
blocks "github.com/ipfs/go-block-format"
1310
"github.com/ipfs/go-cid"
1411
logging "github.com/ipfs/go-log"
@@ -20,7 +17,9 @@ import (
2017
"github.com/ipfs/go-graphsync/cidset"
2118
"github.com/ipfs/go-graphsync/dedupkey"
2219
ipldutil "github.com/ipfs/go-graphsync/ipldutil"
20+
"github.com/ipfs/go-graphsync/listeners"
2321
gsmsg "github.com/ipfs/go-graphsync/message"
22+
"github.com/ipfs/go-graphsync/messagequeue"
2423
"github.com/ipfs/go-graphsync/metadata"
2524
"github.com/ipfs/go-graphsync/notifications"
2625
"github.com/ipfs/go-graphsync/requestmanager/executor"

requestmanager/requestmanager_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/ipfs/go-graphsync/listeners"
11-
1210
blocks "github.com/ipfs/go-block-format"
1311
"github.com/ipld/go-ipld-prime"
1412
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
@@ -18,6 +16,7 @@ import (
1816
"github.com/ipfs/go-graphsync"
1917
"github.com/ipfs/go-graphsync/cidset"
2018
"github.com/ipfs/go-graphsync/dedupkey"
19+
"github.com/ipfs/go-graphsync/listeners"
2120
gsmsg "github.com/ipfs/go-graphsync/message"
2221
"github.com/ipfs/go-graphsync/metadata"
2322
"github.com/ipfs/go-graphsync/notifications"

responsemanager/peerresponsemanager/peerresponsesender.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (prs *peerResponseSender) sendResponseMessages() {
467467
continue
468468
}
469469
notifications.SubscribeWithData(prs.publisher, builder.Topic(), notifications.Notifee{
470-
Data: builder.BlockSize(),
470+
Data: builder.BlockSize(),
471471
Subscriber: prs.allocatorSubscriber,
472472
})
473473
responses, blks, err := builder.Build()
@@ -476,7 +476,7 @@ func (prs *peerResponseSender) sendResponseMessages() {
476476
}
477477

478478
prs.peerHandler.SendResponse(prs.p, responses, blks, notifications.Notifee{
479-
Data: builder.Topic(),
479+
Data: builder.Topic(),
480480
Subscriber: prs.subscriber,
481481
})
482482

testutil/testnotifications.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (nv *NotifeeVerifier) ExpectClose(ctx context.Context, t *testing.T) {
8888
func NewTestNotifee(data notifications.TopicData, bufferSize int) (notifications.Notifee, *NotifeeVerifier) {
8989
subscriber := NewTestSubscriber(bufferSize)
9090
return notifications.Notifee{
91-
Data: data,
91+
Data: data,
9292
Subscriber: notifications.NewTopicDataSubscriber(subscriber),
9393
}, &NotifeeVerifier{
9494
expectedTopic: data,

0 commit comments

Comments
 (0)