pocmine

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetOwner

func SetOwner(pri string) error

func ShaInput

func ShaInput(header *types.Header) []byte

func Sign

func Sign(header *types.Header) (sig []byte, err error)

func Verify

func Verify(pubkey []byte, header *types.Header, signature []byte) bool

Types

type Generator

type Generator struct {
	sync.Map
}

func GetGenerator

func GetGenerator() *Generator

func (*Generator) AddWorkPoc

func (ge *Generator) AddWorkPoc(wp *WorkPoc)

func (*Generator) GetWorkPoc

func (ge *Generator) GetWorkPoc(pidNumber common.Hash) *WorkPoc

type Owner

type Owner struct {
	PrivateKey *ecdsa.PrivateKey
	Coinbase   common.Address
}
var OwnerCoin *Owner

type WorkPoc

type WorkPoc struct {
	Pid        common.Hash
	Proof      []byte
	K          uint8
	Difficulty *big.Int
	Number     *big.Int
	Timestamp  int64
}

func NewWorkPoc

func NewWorkPoc(pid common.Hash, Proof []byte, k uint8, diff *big.Int, number *big.Int, timestamp int64) *WorkPoc

func (*WorkPoc) GeyKey

func (s *WorkPoc) GeyKey() common.Hash

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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