Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MinerProofStore ¶
type MinerProofStore interface { // UpsertMinerProof is used to set the miner proof for a given currency id. // // @input - context, currency id, miner key type, miner address, proof. // // @output - error. UpsertMinerProof(ctx context.Context, currencyID byte, minerKeyType byte, minerAddr string, proof []byte) error // GetMinerProof is used to get the miner proof for a given currency id. // // @input - context, currency id. // // @output - if exists, miner key type, miner address, proof, error. GetMinerProof(ctx context.Context, currencyID byte) (bool, byte, string, []byte, error) }
MinerProofStore is the interface for a store that stores linked miner's proof.
type MinerProofStoreImpl ¶
type MinerProofStoreImpl struct {
// contains filtered or unexported fields
}
MinerProofStoreImpl is the implementation of the MinerProofStore interface.
func NewMinerProofStoreImpl ¶
func NewMinerProofStoreImpl(ctx context.Context, signer crypto.Signer, opts Opts) (*MinerProofStoreImpl, error)
NewMinerProofStoreImpl creates a new MinerProofStore.
@input - context, signer, options.
@output - miner proof store, error.
func (*MinerProofStoreImpl) GetMinerProof ¶
func (s *MinerProofStoreImpl) GetMinerProof(ctx context.Context, currencyID byte) (bool, byte, string, []byte, error)
GetMinerProof is used to get the miner proof for a given currency id.
@input - context, currency id.
@output - if exists, miner key type, miner address, proof, error.
func (*MinerProofStoreImpl) Shutdown ¶
func (s *MinerProofStoreImpl) Shutdown()
Shutdown safely shuts down the component.
func (*MinerProofStoreImpl) UpsertMinerProof ¶
func (s *MinerProofStoreImpl) UpsertMinerProof(ctx context.Context, currencyID byte, minerKeyType byte, minerAddr string, proof []byte) error
UpsertMinerProof is used to set the miner proof for a given currency id.
@input - context, currency id, miner key type, miner address, proof.
@output - error.
Click to show internal directories.
Click to hide internal directories.