keykeeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyKeeper

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

func NewKeyKeeper

func NewKeyKeeper(dbPath string, v *vochain.BaseApplication,
	signer *ethereum.SignKeys, index int8) (*KeyKeeper, error)

func (*KeyKeeper) Commit

func (k *KeyKeeper) Commit(height int64)

Commit saves the pending operation

func (*KeyKeeper) OnCancel

func (k *KeyKeeper) OnCancel(pid []byte)

OnCancel will publish the private and reveal keys of the canceled process, if required

func (*KeyKeeper) OnProcess

func (k *KeyKeeper) OnProcess(pid, eid []byte, censusRoot, censusURI string)

OnProcess creates the keys and add them to the pool queue, if the process requires it

func (*KeyKeeper) OnProcessKeys

func (k *KeyKeeper) OnProcessKeys(pid []byte, pub, com string)

func (*KeyKeeper) OnProcessStatusChange

func (k *KeyKeeper) OnProcessStatusChange(pid []byte, status models.ProcessStatus)

OnProcessStatusChange will publish the private and reveal keys of the ended process, if required

func (*KeyKeeper) OnRevealKeys

func (k *KeyKeeper) OnRevealKeys(pid []byte, priv, rev string)

func (*KeyKeeper) OnVote

func (k *KeyKeeper) OnVote(v *models.Vote)

OnVote is not used by the KeyKeeper

func (*KeyKeeper) PrintInfo

func (k *KeyKeeper) PrintInfo(wait time.Duration)

PrintInfo print some log information every wait duration

func (*KeyKeeper) RevealUnpublished

func (k *KeyKeeper) RevealUnpublished()

RevealUnpublished is a rescue function for revealing keys that should be already revealed. It should be callend once the Vochain is syncronized in order to have the correct height.

func (*KeyKeeper) Rollback

func (k *KeyKeeper) Rollback()

Rollback removes the non committed pending operations. Rollback must be called before any other operation in order to allocate the pool queue memory.

Jump to

Keyboard shortcuts

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