Documentation ¶
Index ¶
- func GetCanonicalStateRoot(txn *badger.Txn) ([]byte, error)
- func GetCurrentStateRoot(txn *badger.Txn) ([]byte, error)
- func GetPendingStateRoot(txn *badger.Txn) ([]byte, error)
- func SetCanonicalStateRoot(txn *badger.Txn, root []byte) error
- func SetCurrentStateRoot(txn *badger.Txn, root []byte) error
- func SetPendingStateRoot(txn *badger.Txn, root []byte) error
- type UTXOTrie
- func (ut *UTXOTrie) ApplyState(txn *badger.Txn, txs aobjs.TxVec, height uint32) ([]byte, error)
- func (ut *UTXOTrie) Contains(txn *badger.Txn, utxoIDs [][]byte) ([][]byte, error)
- func (ut *UTXOTrie) FinalizeSnapShotRoot(txn *badger.Txn, root []byte, height uint32) error
- func (ut *UTXOTrie) Get(txn *badger.Txn, utxoIDs [][]byte) ([][]byte, [][]byte, error)
- func (ut *UTXOTrie) GetCanonicalTrie(txn *badger.Txn) (*trie.SMT, error)
- func (ut *UTXOTrie) GetCurrentStateRoot(txn *badger.Txn) ([]byte, error)
- func (ut *UTXOTrie) GetCurrentTrie(txn *badger.Txn) (*trie.SMT, error)
- func (ut *UTXOTrie) GetPendingTrie(txn *badger.Txn) (*trie.SMT, error)
- func (ut *UTXOTrie) GetSnapShotNode(txn *badger.Txn, height uint32, key []byte) ([]byte, error)
- func (ut *UTXOTrie) GetStateRootForProposal(txn *badger.Txn, txs aobjs.TxVec) ([]byte, error)
- func (ut *UTXOTrie) Init(_ uint32) error
- func (ut *UTXOTrie) StoreSnapShotNode(txn *badger.Txn, batch []byte, root []byte, layer int) ([][]byte, int, []trie.LeafNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCanonicalStateRoot ¶
func GetCurrentStateRoot ¶
func GetPendingStateRoot ¶
func SetCanonicalStateRoot ¶
func SetCurrentStateRoot ¶
func SetPendingStateRoot ¶
Types ¶
type UTXOTrie ¶
type UTXOTrie struct { DB *badger.DB // contains filtered or unexported fields }
UTXOTrie stores the active UTXO set. There are two types of entries in the utxoTrie. The first type is a standard UTXO. These entries are stored at the location of the UTXOID with the value equal to the preHash of the UTXO. The second type is the deposit entry. These are stored at the location of the Nonce of the deposit with the value equal to the PreHash of the Deposit. In order to spend a UTXO it must be present in the trie. In order to spend a deposit it MUST NOT be in the trie.
func (*UTXOTrie) ApplyState ¶
func (*UTXOTrie) FinalizeSnapShotRoot ¶
func (*UTXOTrie) GetCanonicalTrie ¶
func (*UTXOTrie) GetCurrentStateRoot ¶
func (*UTXOTrie) GetCurrentTrie ¶
func (*UTXOTrie) GetPendingTrie ¶
func (*UTXOTrie) GetSnapShotNode ¶
func (*UTXOTrie) GetStateRootForProposal ¶
Click to show internal directories.
Click to hide internal directories.