Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConsensusTx ¶
func CheckConsensusTx(consensus *Request_Consensus) bool
Types ¶
type OracleData ¶
type Request_Consensus ¶
type Request_Contract ¶
type Request_Oracle_Data ¶
type Transaction ¶
type Transaction struct { Time string `json:"time" db:"tx_time"` Type string `json:"type" db:"tx_type"` Hash string `json:"hash" db:"tx_hash"` Data string `json:"data" db:"tx_data"` Prev string `json:"prev" db:"tx_prev"` Epoc string `json:"epoc" db:"tx_epoc"` Subg string `json:"subg" db:"tx_subg"` Prnt string `json:"prnt" db:"tx_prnt"` Mile bool `json:"mile" db:"tx_mile"` Lead bool `json:"lead" db:"tx_lead"` Height int64 `json:"height" db:"tx_height"` }
Transaction This is the structure of the transaction
func CreateTransaction ¶
func CreateTrustedTransaction ¶
func CreateTrustedTransaction(prev string, trusted_data Trusted_Data) Transaction
func DeserializeTransaction ¶
func DeserializeTransaction(data []byte) Transaction
func (*Transaction) ParseInterface ¶
func (tx *Transaction) ParseInterface() interface{}
func (*Transaction) Serialize ¶
func (tx *Transaction) Serialize() []byte
type Trusted_Data ¶
type Trusted_Data struct { TrustedData []OracleData `json:"trusted_data"` TrustedAnswer float64 `json:trusted_answer` }
Click to show internal directories.
Click to hide internal directories.