updates

package
v0.0.0-...-0b69eb1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const GET_METHOD_NAME = "get_merkle_root"

Variables

This section is empty.

Functions

func Watcher

func Watcher(newStates <-chan *types.State, addrs <-chan *address.Address, sh *state.StateHolder, sp provider.StateProvider)

Types

type Create

type Create struct {
	Type      string `json:"type"`
	Root      string `json:"root"`
	Depth     int    `json:"depth"`
	LastIndex uint64 `json:"last_index"`
}

type FileUpdateRecorder

type FileUpdateRecorder struct {
	Base string
}

func (*FileUpdateRecorder) Record

func (up *FileUpdateRecorder) Record(upd any, toVersion int) error

type NodeUpdate

type NodeUpdate struct {
	Index uint64      `json:"index"`
	Node  *types.Node `json:"node"`
}

type Recorder

type Recorder interface {
	Record(upd any, toVersion int) error
}

type Update

type Update struct {
	Type         string                 `json:"type"`
	Root         string                 `json:"root"`
	Updates      map[int]NodeUpdate     `json:"updates"`
	Hashes       map[uint64]*types.Node `json:"hashes"`
	NewLastIndex uint64                 `json:"new_last_index"`
}

Jump to

Keyboard shortcuts

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