Documentation
¶
Index ¶
- type AccountUpdaterService
- type Storage
- func (s *Storage) AddAccount(parent context.Context, layer uint32, address string, balance uint64) error
- func (s *Storage) AddAccountQuery(layer uint32, address string, balance uint64) *mongo.UpdateOneModel
- func (s *Storage) AddAccountReceived(parent context.Context, layer uint32, address string, amount uint64) error
- func (s *Storage) AddAccountReward(parent context.Context, layer uint32, address string, reward uint64, ...) error
- func (s *Storage) AddAccountSent(parent context.Context, layer uint32, address string, amount uint64, ...) error
- func (s *Storage) Close()
- func (s *Storage) GetAccount(parent context.Context, query *bson.D) (*model.Account, error)
- func (s *Storage) GetAccounts(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetAccountsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetActivation(parent context.Context, query *bson.D) (*model.Activation, error)
- func (s *Storage) GetActivations(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetActivationsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetBlock(parent context.Context, query *bson.D) (*model.Block, error)
- func (s *Storage) GetBlocks(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetBlocksCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetCirculation(parent context.Context) (int64, error)
- func (s *Storage) GetEpoch(parent context.Context, query *bson.D) (*model.Epoch, error)
- func (s *Storage) GetEpochByNumber(parent context.Context, epochNumber int32) (*model.Epoch, error)
- func (s *Storage) GetEpochForLayer(layer uint32) uint32
- func (s *Storage) GetEpochLayers(epoch int32) (uint32, uint32)
- func (s *Storage) GetEpochLayersFilter(epochNumber int32, key string) *bson.D
- func (s *Storage) GetEpochNumLayers() uint32
- func (s *Storage) GetEpochs(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetEpochsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetEpochsData(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]*model.Epoch, error)
- func (s *Storage) GetLastActivationReceived() int64
- func (s *Storage) GetLastLayer(parent context.Context) uint32
- func (s *Storage) GetLayer(parent context.Context, query *bson.D) (*model.Layer, error)
- func (s *Storage) GetLayerByNumber(parent context.Context, layerNumber uint32) (*model.Layer, error)
- func (s *Storage) GetLayers(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetLayersCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetLayersRewards(parent context.Context, layerStart uint32, layerEnd uint32) (int64, int64)
- func (s *Storage) GetNetworkInfo(parent context.Context) (*model.NetworkInfo, error)
- func (s *Storage) GetReward(parent context.Context, query *bson.D) (*model.Reward, error)
- func (s *Storage) GetRewards(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetRewardsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetRewardsTotalSum(ctx context.Context) (int64, error)
- func (s *Storage) GetSmesher(parent context.Context, query *bson.D) (*model.Smesher, error)
- func (s *Storage) GetSmesherRewards(parent context.Context, smesher string) (int64, int64)
- func (s *Storage) GetSmeshers(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetSmeshersCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetTransaction(parent context.Context, query *bson.D) (*model.Transaction, error)
- func (s *Storage) GetTransactions(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]model.Transaction, error)
- func (s *Storage) GetTransactionsAmount(parent context.Context, query *bson.D) int64
- func (s *Storage) GetTransactionsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) InitAccountsStorage(ctx context.Context) error
- func (s *Storage) InitActivationsStorage(ctx context.Context) error
- func (s *Storage) InitBlocksStorage(ctx context.Context) error
- func (s *Storage) InitEpochsStorage(ctx context.Context) error
- func (s *Storage) InitLayersStorage(ctx context.Context) error
- func (s *Storage) InitRewardsStorage(ctx context.Context) error
- func (s *Storage) InitSmeshersStorage(ctx context.Context) error
- func (s *Storage) InitTransactionsStorage(ctx context.Context) error
- func (s *Storage) IsLayerInQueue(layer *pb.Layer) bool
- func (s *Storage) IsSmesherExists(parent context.Context, smesher string) bool
- func (s *Storage) IsTransactionExists(parent context.Context, txId string) bool
- func (s *Storage) LayersInQueue() int
- func (s *Storage) OnAccounts(accounts []*types.Account)
- func (s *Storage) OnActivation(atx *types.ActivationTx)
- func (s *Storage) OnActivations(atxs []*model.Activation)
- func (s *Storage) OnLayer(in *pb.Layer)
- func (s *Storage) OnMalfeasanceProof(in *pb.MalfeasanceProof)
- func (s *Storage) OnNetworkInfo(genesisId string, genesisTime uint64, epochNumLayers uint32, ...)
- func (s *Storage) OnNodeStatus(connectedPeers uint64, isSynced bool, syncedLayer uint32, topLayer uint32, ...)
- func (s *Storage) OnReward(in *pb.Reward)
- func (s *Storage) OnTransactionResult(res *pb.TransactionResult, state *pb.TransactionState)
- func (s *Storage) Ping() error
- func (s *Storage) RecalculateEpochStats()
- func (s *Storage) SaveAccount(parent context.Context, layer uint32, in *model.Account) error
- func (s *Storage) SaveActivation(parent context.Context, in *model.Activation) error
- func (s *Storage) SaveBlock(parent context.Context, in *model.Block) error
- func (s *Storage) SaveEpoch(parent context.Context, epoch *model.Epoch) error
- func (s *Storage) SaveLayer(parent context.Context, in *model.Layer) error
- func (s *Storage) SaveMalfeasanceProof(parent context.Context, in *model.MalfeasanceProof) error
- func (s *Storage) SaveOrUpdateActivation(parent context.Context, atx *model.Activation) error
- func (s *Storage) SaveOrUpdateActivations(parent context.Context, atxs []*model.Activation) error
- func (s *Storage) SaveOrUpdateBlocks(parent context.Context, in []*model.Block) error
- func (s *Storage) SaveOrUpdateEpoch(parent context.Context, epoch *model.Epoch) error
- func (s *Storage) SaveOrUpdateLayer(parent context.Context, in *model.Layer) error
- func (s *Storage) SaveOrUpdateNetworkInfo(parent context.Context, in *model.NetworkInfo) error
- func (s *Storage) SaveReward(parent context.Context, in *model.Reward) error
- func (s *Storage) SaveSmesher(parent context.Context, in *model.Smesher, epoch uint32) error
- func (s *Storage) SaveSmesherQuery(in *model.Smesher) *mongo.UpdateOneModel
- func (s *Storage) SaveTransaction(parent context.Context, in *model.Transaction) error
- func (s *Storage) SaveTransactionResult(parent context.Context, in *model.Transaction) error
- func (s *Storage) UpdateAccount(parent context.Context, address string, balance uint64, counter uint64) error
- func (s *Storage) UpdateEpochStats(layer uint32)
- func (s *Storage) UpdateSmesher(parent context.Context, in *model.Smesher, epoch uint32) error
- func (s *Storage) UpdateSmesherQuery(in *model.Smesher, epoch uint32) (*mongo.UpdateOneModel, *mongo.UpdateOneModel)
- func (s *Storage) UpdateTransactionState(parent context.Context, id string, state int32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountUpdaterService ¶
type Storage ¶
type Storage struct { NetworkInfo model.NetworkInfo AccountUpdater AccountUpdaterService sync.Mutex // contains filtered or unexported fields }
func (*Storage) AddAccount ¶
func (*Storage) AddAccountQuery ¶ added in v1.6.1
func (*Storage) AddAccountReceived ¶
func (*Storage) AddAccountReward ¶
func (*Storage) AddAccountSent ¶
func (*Storage) GetAccount ¶
func (*Storage) GetAccounts ¶
func (*Storage) GetAccountsCount ¶
func (*Storage) GetActivation ¶
func (*Storage) GetActivations ¶
func (*Storage) GetActivationsCount ¶
func (*Storage) GetBlocksCount ¶
func (*Storage) GetCirculation ¶ added in v1.2.0
func (*Storage) GetEpochByNumber ¶
func (*Storage) GetEpochForLayer ¶
func (*Storage) GetEpochLayersFilter ¶
func (*Storage) GetEpochNumLayers ¶ added in v1.2.0
func (*Storage) GetEpochsCount ¶
func (*Storage) GetEpochsData ¶
func (*Storage) GetLastActivationReceived ¶ added in v1.5.0
func (*Storage) GetLayerByNumber ¶
func (*Storage) GetLayersCount ¶
func (*Storage) GetLayersRewards ¶
func (*Storage) GetNetworkInfo ¶
func (*Storage) GetRewards ¶
func (*Storage) GetRewardsCount ¶
func (*Storage) GetRewardsTotalSum ¶ added in v1.7.3
func (*Storage) GetSmesher ¶
func (*Storage) GetSmesherRewards ¶
func (*Storage) GetSmeshers ¶
func (*Storage) GetSmeshersCount ¶
func (*Storage) GetTransaction ¶
func (*Storage) GetTransactions ¶
func (s *Storage) GetTransactions(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]model.Transaction, error)
func (*Storage) GetTransactionsAmount ¶
func (*Storage) GetTransactionsCount ¶
func (*Storage) InitAccountsStorage ¶
func (*Storage) InitActivationsStorage ¶
func (*Storage) InitRewardsStorage ¶
func (*Storage) InitSmeshersStorage ¶
func (*Storage) InitTransactionsStorage ¶
func (*Storage) IsLayerInQueue ¶ added in v1.2.0
func (*Storage) IsSmesherExists ¶
func (*Storage) IsTransactionExists ¶
func (*Storage) LayersInQueue ¶ added in v1.2.0
func (*Storage) OnAccounts ¶ added in v1.2.0
func (*Storage) OnActivation ¶ added in v1.5.0
func (s *Storage) OnActivation(atx *types.ActivationTx)
func (*Storage) OnActivations ¶ added in v1.6.1
func (s *Storage) OnActivations(atxs []*model.Activation)
func (*Storage) OnMalfeasanceProof ¶ added in v1.1.0
func (s *Storage) OnMalfeasanceProof(in *pb.MalfeasanceProof)
func (*Storage) OnNetworkInfo ¶
func (*Storage) OnNodeStatus ¶
func (*Storage) OnTransactionResult ¶ added in v1.2.2
func (s *Storage) OnTransactionResult(res *pb.TransactionResult, state *pb.TransactionState)
func (*Storage) RecalculateEpochStats ¶ added in v1.5.0
func (s *Storage) RecalculateEpochStats()
func (*Storage) SaveAccount ¶
func (*Storage) SaveActivation ¶
func (*Storage) SaveMalfeasanceProof ¶ added in v1.1.0
func (*Storage) SaveOrUpdateActivation ¶ added in v1.5.0
func (*Storage) SaveOrUpdateActivations ¶
func (*Storage) SaveOrUpdateBlocks ¶
func (*Storage) SaveOrUpdateEpoch ¶
func (*Storage) SaveOrUpdateLayer ¶
func (*Storage) SaveOrUpdateNetworkInfo ¶
func (*Storage) SaveReward ¶
func (*Storage) SaveSmesher ¶
func (*Storage) SaveSmesherQuery ¶ added in v1.1.2
func (s *Storage) SaveSmesherQuery(in *model.Smesher) *mongo.UpdateOneModel
func (*Storage) SaveTransaction ¶
func (*Storage) SaveTransactionResult ¶ added in v1.2.2
func (*Storage) UpdateAccount ¶
func (*Storage) UpdateEpochStats ¶ added in v1.3.0
func (*Storage) UpdateSmesher ¶
func (*Storage) UpdateSmesherQuery ¶ added in v1.1.2
func (s *Storage) UpdateSmesherQuery(in *model.Smesher, epoch uint32) (*mongo.UpdateOneModel, *mongo.UpdateOneModel)
Click to show internal directories.
Click to hide internal directories.