mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 22:32:15 +00:00
Currently the top level directory contains basically all of the code for the crypto package. This PR moves the crypto code into submodules in a similar manner to what `golang/x/crypto` does. This improves code organization. Ref discussion: https://github.com/tendermint/tendermint/pull/1966 Closes #1956
24 lines
379 B
Go
24 lines
379 B
Go
package types
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestQueryTxFor(t *testing.T) {
|
|
tx := Tx("foo")
|
|
assert.Equal(t,
|
|
fmt.Sprintf("tm.event='Tx' AND tx.hash='%X'", tx.Hash()),
|
|
EventQueryTxFor(tx).String(),
|
|
)
|
|
}
|
|
|
|
func TestQueryForEvent(t *testing.T) {
|
|
assert.Equal(t,
|
|
"tm.event='NewBlock'",
|
|
QueryForEvent(EventNewBlock).String(),
|
|
)
|
|
}
|