server

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NotCalcNonce  = 0
	CalcNonceDone = 1
	CalcNonceEnd  = 2
)

Variables

This section is empty.

Functions

func Reverse

func Reverse(b []byte) []byte

Types

type MineInfo

type MineInfo struct {
	TrxId     string
	Difficult uint32
}

type Miner

type Miner struct {
	sync.Mutex
	IP   string
	Port string
	// contains filtered or unexported fields
}

func (*Miner) SendMessageToMiner

func (miner *Miner) SendMessageToMiner(msg string) error

func (*Miner) UpdateMineInfo

func (miner *Miner) UpdateMineInfo(trxid string, diff uint32, send bool)

type MinerRequest

type MinerRequest struct {
	Method string        `json:"method"`
	Params []interface{} `json:"params"`
}

type PowPayload

type PowPayload struct {
	Version  uint32
	TxHash   string
	Reserved [44]byte
	NBits    uint32
	Nonce    uint64
}

type XrpMintServer

type XrpMintServer struct {
	// contains filtered or unexported fields
}

func (*XrpMintServer) AddMiner

func (xrp *XrpMintServer) AddMiner(miner *Miner)

func (*XrpMintServer) ListenTcp

func (xrp *XrpMintServer) ListenTcp()

func (*XrpMintServer) NotifyMiner

func (xrp *XrpMintServer) NotifyMiner(trxid string, diff uint32, nonceReport chan uint64, rebuildTrx chan bool)

Jump to

Keyboard shortcuts

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