Documentation
¶
Overview ¶
Package stateconf configures state management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSnapshotUpdatePayload ¶
func ExtractSnapshotUpdatePayload(opts ...SnapshotUpdateOption) any
ExtractSnapshotUpdatePayload returns the payload carried by a WithSnapshotUpdatePayload option. Only one such option can be used at once; behaviour is otherwise undefined.
func ExtractTrieDBUpdatePayload ¶
ExtractTrieDBUpdatePayload returns the payload carried by a WithTrieDBUpdatePayload option. Only one such option can be used at once; behaviour is otherwise undefined.
Types ¶
type SnapshotUpdateOption ¶
A SnapshotUpdateOption configures the behaviour of state.SnapshotTree.Update() implementations. This will be removed along with state.SnapshotTree.
func ExtractSnapshotUpdateOpts ¶
func ExtractSnapshotUpdateOpts(opts ...StateDBCommitOption) []SnapshotUpdateOption
ExtractSnapshotUpdateOpts returns the list of SnapshotUpdateOptions carried by the provided slice of StateDBCommitOption.
func WithSnapshotUpdatePayload ¶
func WithSnapshotUpdatePayload(p any) SnapshotUpdateOption
WithSnapshotUpdatePayload returns a SnapshotUpdateOption carrying an arbitrary payload. It acts only as a carrier to exploit existing function plumbing and the effect on behaviour is left to the implementation receiving it.
type StateDBCommitOption ¶
A StateDBCommitOption configures the behaviour of state.StateDB.Commit()
func WithSnapshotUpdateOpts ¶
func WithSnapshotUpdateOpts(opts ...SnapshotUpdateOption) StateDBCommitOption
WithSnapshotUpdateOpts returns a StateDBCommitOption carrying a list of SnapshotUpdateOptions. If multiple such options are used, only the last will be applied as they overwrite each other.
func WithTrieDBUpdateOpts ¶
func WithTrieDBUpdateOpts(opts ...TrieDBUpdateOption) StateDBCommitOption
WithTrieDBUpdateOpts returns a StateDBCommitOption carrying a list of TrieDBUpdateOptions. If multiple such options are used, only the last will be applied as they overwrite each other.
type TrieDBUpdateOption ¶
A TrieDBUpdateOption configures the behaviour of triedb.Database.Update() implementations.
func ExtractTrieDBUpdateOpts ¶
func ExtractTrieDBUpdateOpts(opts ...StateDBCommitOption) []TrieDBUpdateOption
ExtractTrieDBUpdateOpts returns the list of TrieDBUpdateOptions carried by the provided slice of StateDBCommitOption.
func WithTrieDBUpdatePayload ¶
func WithTrieDBUpdatePayload(parent common.Hash, current common.Hash) TrieDBUpdateOption
WithTrieDBUpdatePayload returns a TrieDBUpdateOption carrying two block hashes. It acts only as a carrier to exploit existing function plumbing and the effect on behaviour is left to the implementation receiving it.