connection

package
v0.0.0-...-0fb7b88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoCommitSigs is thrown if the result in the JSON response
	// for the commit RPC is nil. This can be due to passing in an
	// invalid/non-existent height into the query.
	ErrNoCommitSigs = errors.New("no commit signatures found for height ")
)

Functions

func GetCommitSigs

func GetCommitSigs(rpcladdr string, client *http.Client, height int64) (*[]types.CommitSig, error)

GetCommitSigs gets the commit signatures of the specified height.

func RetrySecretDial

func RetrySecretDial(protocol, address string, privkey ed25519.PrivateKey, logger *log.Logger) (*p2pconn.SecretConnection, error)

RetrySecretDial dials the given address until success and returns a secret connection.

Types

type CommitRPCResponse

type CommitRPCResponse struct {
	Result *coretypes.ResultCommit `json:"result"`
	// contains filtered or unexported fields
}

CommitRPCResponse is the JSONRPC 2.0 response to the commit RPC request.

type ReadWriteConn

type ReadWriteConn struct {
	// SecretConn holds the secret connection for communication between
	// Pairmint and Tendermint.
	SecretConn *p2pconn.SecretConnection

	// Reader is used to read from the TCP stream.
	Reader protoio.ReadCloser

	// Writer is used to write to the TCP stream.
	Writer protoio.WriteCloser
}

ReadWriteConn holds the secret connection, the reader and the writer.

func NewReadWriteConn

func NewReadWriteConn() *ReadWriteConn

NewReadWriteConn returns a new instance of ReadWriteConn.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL