Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
passing no evaluation criteria checker i.e. always return true
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmeanjan committed Mar 9, 2021
1 parent 3484e22 commit bc95d51
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions app/graph/schema.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package graph
import (
"context"
"errors"
"fmt"

"github.com/ethereum/go-ethereum/common"
"github.com/itzmeanjan/harmony/app/config"
Expand Down Expand Up @@ -146,7 +147,8 @@ func (r *subscriptionResolver) NewPendingTx(ctx context.Context) (<-chan *model.

comm := make(chan *model.MemPoolTx, 1)

go ListenToMessages(ctx, _pubsub, config.GetPendingTxEntryPublishTopic(), comm)
// Because client wants to listen to any tx being published on this topic
go ListenToMessages(ctx, _pubsub, config.GetPendingTxEntryPublishTopic(), NoEvaluationCriteria, comm)

return comm, nil

Expand All @@ -161,7 +163,8 @@ func (r *subscriptionResolver) NewQueuedTx(ctx context.Context) (<-chan *model.M

comm := make(chan *model.MemPoolTx, 1)

go ListenToMessages(ctx, _pubsub, config.GetQueuedTxEntryPublishTopic(), comm)
// Because client wants to listen to any tx being published on this topic
go ListenToMessages(ctx, _pubsub, config.GetQueuedTxEntryPublishTopic(), NoEvaluationCriteria, comm)

return comm, nil

Expand All @@ -176,7 +179,8 @@ func (r *subscriptionResolver) NewConfirmedTx(ctx context.Context) (<-chan *mode

comm := make(chan *model.MemPoolTx, 1)

go ListenToMessages(ctx, _pubsub, config.GetPendingTxExitPublishTopic(), comm)
// Because client wants to listen to any tx being published on this topic
go ListenToMessages(ctx, _pubsub, config.GetPendingTxExitPublishTopic(), NoEvaluationCriteria, comm)

return comm, nil

Expand All @@ -191,12 +195,29 @@ func (r *subscriptionResolver) NewUnstuckTx(ctx context.Context) (<-chan *model.

comm := make(chan *model.MemPoolTx, 1)

go ListenToMessages(ctx, _pubsub, config.GetQueuedTxExitPublishTopic(), comm)
// Because client wants to listen to any tx being published on this topic
go ListenToMessages(ctx, _pubsub, config.GetQueuedTxExitPublishTopic(), NoEvaluationCriteria, comm)

return comm, nil

}

func (r *subscriptionResolver) NewPendingTxFrom(ctx context.Context, address string) (<-chan *model.MemPoolTx, error) {
panic(fmt.Errorf("not implemented"))
}

func (r *subscriptionResolver) NewQueuedTxFrom(ctx context.Context, address string) (<-chan *model.MemPoolTx, error) {
panic(fmt.Errorf("not implemented"))
}

func (r *subscriptionResolver) NewConfirmedTxFrom(ctx context.Context, address string) (<-chan *model.MemPoolTx, error) {
panic(fmt.Errorf("not implemented"))
}

func (r *subscriptionResolver) NewUnstuckTxFrom(ctx context.Context, address string) (<-chan *model.MemPoolTx, error) {
panic(fmt.Errorf("not implemented"))
}

// Query returns generated.QueryResolver implementation.
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }

Expand Down

0 comments on commit bc95d51

Please sign in to comment.