Documentation ¶
Index ¶
- Constants
- type BlockNode
- type BlocksMMRTree
- type Leaf
- type Tree
- func (t *Tree) AddBlock(hash chainhash.Hash, difficulty uint64)
- func (t *Tree) Block(height int32) *BlockNode
- func (t *Tree) Current() *BlockNode
- func (t *Tree) CurrentRoot() chainhash.Hash
- func (t *Tree) Fork() BlocksMMRTree
- func (t *Tree) LookupNodeByRoot(hash chainhash.Hash) (*BlockNode, bool)
- func (t *Tree) Parent(height int32) *BlockNode
- func (t *Tree) ResetRootTo(hash chainhash.Hash, height int32)
- func (t *Tree) RmBlock(hash chainhash.Hash, height int32)
- func (t *Tree) RootForHeight(height int32) chainhash.Hash
- func (t *Tree) SetBlock(hash chainhash.Hash, difficulty uint64, height int32)
- type Value
Constants ¶
View Source
const ValueSize = 40
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockNode ¶
type BlocksMMRTree ¶
type BlocksMMRTree interface { Current() *BlockNode Parent(height int32) *BlockNode Block(height int32) *BlockNode CurrentRoot() chainhash.Hash RootForHeight(height int32) chainhash.Hash LookupNodeByRoot(chainhash.Hash) (*BlockNode, bool) AddBlock(hash chainhash.Hash, difficulty uint64) SetBlock(hash chainhash.Hash, difficulty uint64, height int32) RmBlock(hash chainhash.Hash, height int32) ResetRootTo(hash chainhash.Hash, height int32) }
type Tree ¶
func (*Tree) CurrentRoot ¶
func (*Tree) Fork ¶
func (t *Tree) Fork() BlocksMMRTree
func (*Tree) LookupNodeByRoot ¶
func (*Tree) ResetRootTo ¶
ResetRootTo sets provided block with <hash, height> as latest and drops all blocks after this.
Click to show internal directories.
Click to hide internal directories.