parsigdb

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDB

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

MemDB is a placeholder in-memory partial signature database. It will be replaced with a BadgerDB implementation.

func NewMemDB

func NewMemDB(threshold int) *MemDB

NewMemDB returns a new in-memory partial signature database instance.

func (*MemDB) StoreExternal

func (db *MemDB) StoreExternal(ctx context.Context, duty core.Duty, signedSet core.ParSignedDataSet) error

StoreExternal stores an externally received partially signed duty data set.

func (*MemDB) StoreInternal

func (db *MemDB) StoreInternal(ctx context.Context, duty core.Duty, signedSet core.ParSignedDataSet) error

StoreInternal stores an internally received partially signed duty data set.

func (*MemDB) SubscribeInternal

func (db *MemDB) SubscribeInternal(fn func(context.Context, core.Duty, core.ParSignedDataSet) error)

SubscribeInternal registers a callback when an internal partially signed duty set is stored.

func (*MemDB) SubscribeThreshold

func (db *MemDB) SubscribeThreshold(fn func(context.Context, core.Duty, core.PubKey, []core.ParSignedData) error)

SubscribeThreshold registers a callback when *threshold* partially signed duty is reached for a DV.

Jump to

Keyboard shortcuts

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