Documentation ¶
Index ¶
- func SetConfigFromFlags(configFile *os.File) (config.Config, error)
- func ValidateBlock(b block.Block, version uint16, prevHeight uint64, previousHash []byte, ...) bool
- func ValidateContract(dbConnection *sql.DB, c *contracts.Contract) error
- func ValidatePending(c *contracts.Contract, pBalance *uint64, pNonce *uint64) error
- func ValidateProducerTimestamp(db *sql.DB, timestamp int64, walletAddr []byte, interval time.Duration) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetConfigFromFlags ¶
SetConfigFromFlags loads a configuration file into a Config struct, modifies the struct according to flags, and returns the updated struct
func ValidateBlock ¶
func ValidateBlock(b block.Block, version uint16, prevHeight uint64, previousHash []byte, prevTimeStamp int64) bool
ValidateBlock takes in expected version, height, previousHash, and timeStamp and compares them with the block's
func ValidatePending ¶
ValidatePending validates a contract with the given pending balance and pending state nonce
func ValidateProducerTimestamp ¶
func ValidateProducerTimestamp(db *sql.DB, timestamp int64, walletAddr []byte, interval time.Duration) (bool, error)
ValidateProducerTimestamp checks the parameter timestamp p to see if it is greater than the sum of the interval itv and the table timestamp t (corresponding to the walletAddr). False if p < t + itv
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.