node

package
v0.0.0-...-a5060f3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID              int
	Vrf             consensus.VRF
	Sig             *ecdsa.PrivateKey
	Address         string
	Blockchain      *chain.Blockchain
	Task            network.TaskInfo
	CommitteeMember bool
	Malicious       bool
}

func CreateNode

func CreateNode(id int, addr string, malicious bool) *Node

func (*Node) AmMember

func (n *Node) AmMember() bool

func (*Node) ClientServing

func (n *Node) ClientServing(port string) error

func (*Node) GetGlobalParam

func (n *Node) GetGlobalParam(task string) (string, int)

func (*Node) GetTxs

func (n *Node) GetTxs(conn *rpc.Client)

func (*Node) SendTx

func (n *Node) SendTx(tx chain.LocalTransaction, conn *rpc.Client)

Jump to

Keyboard shortcuts

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