network_server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockTxCount

func GetBlockTxCount(blockHash [32]byte) (int64, error)

Types

type Server

type Server struct {
	network_pb.UnimplementedNetworkServer
	Verbose bool
	Port    int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(verbose bool, port int) *Server

func (*Server) GetBalance

func (s *Server) GetBalance(_ context.Context, address *network_pb.Address) (*network_pb.BalanceReply, error)

func (*Server) GetBlockByHash

func (s *Server) GetBlockByHash(_ context.Context, req *network_pb.BlockHashRequest) (*network_pb.BlockInfo, error)

func (*Server) GetBlockByHeight

func (s *Server) GetBlockByHeight(_ context.Context, req *network_pb.BlockRequest) (*network_pb.BlockInfo, error)

func (*Server) GetBlockInfos

func (*Server) GetBlockTxs

func (*Server) GetMempoolTxs

func (*Server) GetTx

func (*Server) GetTxBlock

func (*Server) GetUtxos

func (*Server) ListenTx

func (*Server) OutputMessage

func (s *Server) OutputMessage(_ context.Context, stringMessage *network_pb.StringMessage) (*network_pb.ErrorReply, error)

func (*Server) Run

func (s *Server) Run() error

func (*Server) SaveTxBlock

func (s *Server) SaveTxBlock(ctx context.Context, txBlock *network_pb.TxBlock) (*network_pb.ErrorReply, error)

func (*Server) SaveTxs

func (s *Server) SaveTxs(ctx context.Context, txs *network_pb.Txs) (*network_pb.SaveTxsReply, error)

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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