Documentation ¶
Overview ¶
Package state provides types for encapsulating blockchain state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutputTreeItem ¶
OutputTreeItem returns the key of an output in the state tree, as well as the output commitment (a second []byte) for Inserts into the state tree.
Types ¶
type Output ¶
Output represents a spent or unspent output for the validation process.
type PriorIssuances ¶
PriorIssuances maps an "issuance hash" to the time (in Unix millis) at which it should expire from the issuance memory.
type Snapshot ¶
type Snapshot struct { Tree *patricia.Tree Issuances PriorIssuances }
Snapshot encompasses a snapshot of entire blockchain state. It consists of a patricia state tree and the issuances memory.
func Copy ¶
Copy makes a copy of provided snapshot. Copying a snapshot is an O(n) operation where n is the number of issuance hashes in the snapshot's issuance memory.
func (*Snapshot) PruneIssuances ¶
PruneIssuances modifies a Snapshot, removing all issuance hashes with expiration times earlier than the provided timestamp.