make the rest of the code compile

This commit is contained in:
Callum Waters
2021-08-24 13:26:01 +02:00
parent dcf91478f8
commit 68c54f0676
283 changed files with 3874 additions and 3906 deletions
+2 -4
View File
@@ -1,15 +1,13 @@
package query
import (
"github.com/tendermint/tendermint/abci/types"
)
import "github.com/tendermint/tendermint/pkg/abci"
// Empty query matches any set of events.
type Empty struct {
}
// Matches always returns true.
func (Empty) Matches(events []types.Event) (bool, error) {
func (Empty) Matches(events []abci.Event) (bool, error) {
return true, nil
}
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"testing"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/pubsub/query"
"github.com/tendermint/tendermint/pkg/abci"
)
func TestEmptyQueryMatchesAnything(t *testing.T) {
+3 -3
View File
@@ -16,7 +16,7 @@ import (
"strings"
"time"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/pkg/abci"
)
var (
@@ -200,7 +200,7 @@ func (q *Query) Conditions() ([]Condition, error) {
//
// For example, query "name=John" matches events = {"name": ["John", "Eric"]}.
// More examples could be found in parser_test.go and query_test.go.
func (q *Query) Matches(rawEvents []types.Event) (bool, error) {
func (q *Query) Matches(rawEvents []abci.Event) (bool, error) {
if len(rawEvents) == 0 {
return false, nil
}
@@ -505,7 +505,7 @@ func matchValue(value string, op Operator, operand reflect.Value) (bool, error)
return false, nil
}
func flattenEvents(events []types.Event) map[string][]string {
func flattenEvents(events []abci.Event) map[string][]string {
flattened := make(map[string][]string)
for _, event := range events {
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"time"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/pubsub/query"
"github.com/tendermint/tendermint/pkg/abci"
)
func expandEvents(flattenedEvents map[string][]string) []abci.Event {