process

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2016 License: MIT Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FactoshisPerCredit uint64 // .001 / .15 * 100000000 (assuming a Factoid is .15 cents, entry credit = .1 cents

	FactomdUser string
	FactomdPass string
)

Functions

func GetEntryCreditBalance

func GetEntryCreditBalance(pubKey *[32]byte) (int32, error)

func HaveBlockInDB

func HaveBlockInDB(hash *common.Hash) (bool, error)

HaveBlockInDB returns whether or not the chain instance has the block represented by the passed hash. This includes checking the various places a block can be like part of the main chain, on a side chain, or in the orphan pool.

This function is NOT safe for concurrent access.

func IsTSValid

func IsTSValid(hash []byte, timestamp int64) bool

Checks if the timestamp is valid. If the timestamp is too old or too far into the future, then we don't consider it valid. Or if we have seen this hash before, then it is not valid. To that end, this code remembers hashes tested in the past, and rejects the second submission of the same hash.

func IsTSValid_

func IsTSValid_(hash []byte, timestamp int64, now int64) bool

To make the function testable, the logic accepts the current time as a parameter. This way, the test code can manipulate the clock at will.

func LoadConfigurations

func LoadConfigurations(cfg *util.FactomdConfig)

Get the configurations

func SignDirectoryBlock

func SignDirectoryBlock() error

Sign the directory block

func Start_Processor

func Start_Processor(
	ldb database.Db,
	inMsgQ chan wire.FtmInternalMsg,
	outMsgQ chan wire.FtmInternalMsg,
	inCtlMsgQ chan wire.FtmInternalMsg,
	outCtlMsgQ chan wire.FtmInternalMsg)

Started from factomd

Types

type BlockTimer

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

BlockTimer is set to sent End-Of-Minute messages to processor

func (*BlockTimer) StartBlockTimer

func (bt *BlockTimer) StartBlockTimer()

Send End-Of-Minute messages to processor for the current open directory block

Jump to

Keyboard shortcuts

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