keykeeper

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 15 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)

NewKeyKeeper registers a new keyKeeper to the vochain

func (*KeyKeeper) Commit

func (k *KeyKeeper) Commit(height uint32) error

Commit saves the pending operation

func (*KeyKeeper) OnBeginBlock added in v1.9.0

func (*KeyKeeper) OnBeginBlock(state.BeginBlock)

func (*KeyKeeper) OnCancel

func (k *KeyKeeper) OnCancel(pid []byte, _ int32)

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

func (*KeyKeeper) OnCensusUpdate added in v1.9.0

func (*KeyKeeper) OnCensusUpdate(_, _ []byte, _ string)

func (*KeyKeeper) OnNewTx added in v1.0.3

func (*KeyKeeper) OnNewTx(_ *vochaintx.Tx, _ uint32, _ int32)

OnNewTx is not used by the KeyKeeper

func (*KeyKeeper) OnProcess

func (k *KeyKeeper) OnProcess(pid, _ []byte, _, _ string, _ int32)

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

func (*KeyKeeper) OnProcessKeys

func (*KeyKeeper) OnProcessKeys(_ []byte, _ string, _ int32)

OnProcessKeys does nothing

func (*KeyKeeper) OnProcessResults added in v1.0.3

func (*KeyKeeper) OnProcessResults(_ []byte, _ *models.ProcessResult, _ int32)

OnProcessResults does nothing

func (*KeyKeeper) OnProcessStatusChange

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

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

func (*KeyKeeper) OnProcessesStart added in v1.3.0

func (*KeyKeeper) OnProcessesStart(_ [][]byte)

OnProcessesStart does nothing

func (*KeyKeeper) OnRevealKeys

func (*KeyKeeper) OnRevealKeys(_ []byte, _ string, _ int32)

OnRevealKeys does nothing

func (*KeyKeeper) OnSetAccount added in v1.4.0

func (*KeyKeeper) OnSetAccount(_ []byte, _ *state.Account)

OnSetAccount does nothing

func (*KeyKeeper) OnSpendTokens added in v1.9.0

func (*KeyKeeper) OnSpendTokens(_ []byte, _ models.TxType, _ uint64, _ string)

OnSpendTokens does nothing

func (*KeyKeeper) OnTransferTokens added in v1.4.0

func (*KeyKeeper) OnTransferTokens(_ *vochaintx.TokenTransfer)

OnTransferTokens does nothing

func (*KeyKeeper) OnVote

func (*KeyKeeper) OnVote(_ *state.Vote, _ int32)

OnVote is not used by the KeyKeeper

func (*KeyKeeper) RevealUnpublished

func (k *KeyKeeper) RevealUnpublished()

RevealUnpublished is a rescue function for revealing keys that should be already revealed. It should be called once the Vochain is synchronized 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