mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
use the tag interface for pubsub. (#1438)
* use the tag interface for pubsub. * update tmlibs. * Fix unresolved conflict.
This commit is contained in:
parent
d93e177a69
commit
6a48bd0c88
6
Gopkg.lock
generated
6
Gopkg.lock
generated
@ -270,6 +270,7 @@
|
|||||||
version = "v0.7.3"
|
version = "v0.7.3"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
|
branch = "develop"
|
||||||
name = "github.com/tendermint/tmlibs"
|
name = "github.com/tendermint/tmlibs"
|
||||||
packages = [
|
packages = [
|
||||||
"autofile",
|
"autofile",
|
||||||
@ -285,8 +286,7 @@
|
|||||||
"pubsub/query",
|
"pubsub/query",
|
||||||
"test"
|
"test"
|
||||||
]
|
]
|
||||||
revision = "2e24b64fc121dcdf1cabceab8dc2f7257675483c"
|
revision = "357648b8d63732df77fb1dd0f5ad813800912854"
|
||||||
version = "v0.8.1"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
@ -383,6 +383,6 @@
|
|||||||
[solve-meta]
|
[solve-meta]
|
||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
analyzer-version = 1
|
analyzer-version = 1
|
||||||
inputs-digest = "9b49dde42e615372db85e13d7952cb547b8b1833458a4906f908af988cf0bd4f"
|
inputs-digest = "794125e6cc5926371340043eed0ce8731a2212367cc6d4b845e4618ef2dd1996"
|
||||||
solver-name = "gps-cdcl"
|
solver-name = "gps-cdcl"
|
||||||
solver-version = 1
|
solver-version = 1
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
[[override]]
|
[[override]]
|
||||||
# [[constraint]]
|
# [[constraint]]
|
||||||
name = "github.com/tendermint/tmlibs"
|
name = "github.com/tendermint/tmlibs"
|
||||||
version = "~0.8.1"
|
# version = "~0.8.1"
|
||||||
|
branch = "develop"
|
||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "google.golang.org/grpc"
|
name = "google.golang.org/grpc"
|
||||||
|
@ -67,7 +67,7 @@ func (b *EventBus) UnsubscribeAll(ctx context.Context, subscriber string) error
|
|||||||
func (b *EventBus) Publish(eventType string, eventData TMEventData) error {
|
func (b *EventBus) Publish(eventType string, eventData TMEventData) error {
|
||||||
// no explicit deadline for publishing events
|
// no explicit deadline for publishing events
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
b.pubsub.PublishWithTags(ctx, eventData, map[string]interface{}{EventTypeKey: eventType})
|
b.pubsub.PublishWithTags(ctx, eventData, tmpubsub.NewTagMap(map[string]interface{}{EventTypeKey: eventType}))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ func (b *EventBus) PublishEventTx(event EventDataTx) error {
|
|||||||
logIfTagExists(TxHeightKey, tags, b.Logger)
|
logIfTagExists(TxHeightKey, tags, b.Logger)
|
||||||
tags[TxHeightKey] = event.Height
|
tags[TxHeightKey] = event.Height
|
||||||
|
|
||||||
b.pubsub.PublishWithTags(ctx, event, tags)
|
b.pubsub.PublishWithTags(ctx, event, tmpubsub.NewTagMap(tags))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user