tracking

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deltas

type Deltas struct {
	// contains filtered or unexported fields
}

Deltas tracks the trie deltas, for example deleted node hashes.

func New

func New() *Deltas

New returns a new Deltas struct.

func (*Deltas) DeepCopy

func (d *Deltas) DeepCopy() (deepCopy *Deltas)

DeepCopy returns a deep copy of the deltas.

func (*Deltas) Deleted

func (d *Deltas) Deleted() (nodeHashes map[common.Hash]struct{})

Deleted returns a set (map) of all the recorded deleted node hashes. Note the map returned is not deep copied for performance reasons and so it's not safe for mutation.

func (*Deltas) MergeWith

func (d *Deltas) MergeWith(deltas Getter)

MergeWith merges the deltas given as argument in the receiving deltas struct.

func (*Deltas) RecordDeleted

func (d *Deltas) RecordDeleted(nodeHash common.Hash)

RecordDeleted records a node hash as deleted.

type Getter

type Getter interface {
	Deleted() (nodeHashes map[common.Hash]struct{})
}

Getter gets deleted node hashes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL