mock

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	BlockID       model.Hash
	PeriodID      uint64
	LastMinersIDs model.Hashes
	// contains filtered or unexported fields
}

func (Block) GetBlockID

func (bm Block) GetBlockID() model.Hash

func (Block) GetNonce

func (bm Block) GetNonce() model.Hash

func (Block) GetPeriodID

func (bm Block) GetPeriodID() uint64

func (Block) GetPreviousBlockID

func (bm Block) GetPreviousBlockID() model.Hash

func (Block) LastMinersLen

func (bm Block) LastMinersLen() int

func (Block) NewTransactionsLen

func (bm Block) NewTransactionsLen() int

func (Block) TransactionsLen

func (bm Block) TransactionsLen() int

type Peer

type Peer struct {
	ID  string
	URL string
	sync.Mutex
	C *websocket.Conn
}

func (*Peer) GetID

func (mp *Peer) GetID() string

func (*Peer) GetURL

func (mp *Peer) GetURL() string

func (*Peer) ReadMessage added in v1.1.1

func (mp *Peer) ReadMessage() (int, []byte, error)

func (*Peer) WriteMessage

func (mp *Peer) WriteMessage(msgType int, data []byte) error

Jump to

Keyboard shortcuts

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