Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface { // Hash returns block hash. Hash() common.Hash Version() uint32 // PrevHash returns previous block hash. PrevHash() common.Hash // MerkleRoot returns a merkle root of the transaction hashes. MerkleRoot() common.Hash // Timestamp returns block's proposal timestamp. Timestamp() uint64 // Index returns block index. Index() uint32 // ConsensusData is a random nonce. ConsensusData() uint64 // Signature returns block's signature. Signature() []byte // Sign signs block and sets it's signature. Sign(key *keys.PrivateKey) error // Verify checks if signature is correct. Verify(key *keys.PublicKey, sign []byte) error // Transactions returns block's transaction list. Transactions() []Transaction // SetTransaction sets block's transaction list. SetTransactions([]Transaction) }
Block is a generic interface for a block used by dbft.
type Transaction ¶
type Transaction interface { // Hash must return cryptographic hash of the transaction. // Transactions which have equal hashes are considered equal. Hash() common.Hash }
Transaction is a generic transaction interface.
Click to show internal directories.
Click to hide internal directories.