Documentation
¶
Index ¶
- Variables
- func GetEntryCreditBalance(pubKey *[32]byte) (int32, error)
- func HaveBlockInDB(hash *common.Hash) (bool, error)
- func IsTSValid(hash []byte, timestamp int64) bool
- func IsTSValid_(hash []byte, timestamp int64, now int64) bool
- func LoadConfigurations(cfg *util.FactomdConfig)
- func SignDirectoryBlock() error
- func Start_Processor(ldb database.Db, inMsgQ chan wire.FtmInternalMsg, ...)
- type BlockTimer
Constants ¶
This section is empty.
Variables ¶
var ( FactoshisPerCredit uint64 // .001 / .15 * 100000000 (assuming a Factoid is .15 cents, entry credit = .1 cents FactomdUser string FactomdPass string )
Functions ¶
func GetEntryCreditBalance ¶
func HaveBlockInDB ¶
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 ¶
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_ ¶
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 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