Documentation
¶
Index ¶
- type BadgerStore
- func (s *BadgerStore) AddNodeOperation(tx *common.VersionedTransaction, timestamp, threshold uint64) error
- func (s *BadgerStore) CacheGetTransaction(hash crypto.Hash) (*common.VersionedTransaction, error)
- func (s *BadgerStore) CacheListTransactions(hook func(tx *common.VersionedTransaction) error) error
- func (s *BadgerStore) CachePutTransaction(tx *common.VersionedTransaction) error
- func (s *BadgerStore) CheckDepositInput(deposit *common.DepositData, tx crypto.Hash) error
- func (s *BadgerStore) CheckGenesisLoad(snapshots []*common.SnapshotWithTopologicalOrder) (bool, error)
- func (s *BadgerStore) CheckGhost(key crypto.Key) (bool, error)
- func (store *BadgerStore) Close() error
- func (s *BadgerStore) LoadGenesis(rounds []*common.Round, snapshots []*common.SnapshotWithTopologicalOrder, ...) error
- func (s *BadgerStore) LockDepositInput(deposit *common.DepositData, tx crypto.Hash, fork bool) error
- func (s *BadgerStore) LockMintInput(mint *common.MintData, tx crypto.Hash, fork bool) error
- func (s *BadgerStore) LockUTXO(hash crypto.Hash, index int, tx crypto.Hash, fork bool) error
- func (s *BadgerStore) ReadAllNodes(offset uint64, withState bool) []*common.Node
- func (s *BadgerStore) ReadDomains() []common.Domain
- func (s *BadgerStore) ReadLastMintDistribution(group string) (*common.MintDistribution, error)
- func (s *BadgerStore) ReadLink(from, to crypto.Hash) (uint64, error)
- func (s *BadgerStore) ReadMintDistributions(group string, offset, count uint64) ([]*common.MintDistribution, []*common.VersionedTransaction, error)
- func (s *BadgerStore) ReadRound(hash crypto.Hash) (*common.Round, error)
- func (s *BadgerStore) ReadSnapshot(hash crypto.Hash) (*common.SnapshotWithTopologicalOrder, error)
- func (s *BadgerStore) ReadSnapshotWithTransactionsSinceTopology(topologyOffset, count uint64) ([]*common.SnapshotWithTopologicalOrder, []*common.VersionedTransaction, error)
- func (s *BadgerStore) ReadSnapshotsForNodeRound(nodeId crypto.Hash, round uint64) ([]*common.SnapshotWithTopologicalOrder, error)
- func (s *BadgerStore) ReadSnapshotsSinceTopology(topologyOffset, count uint64) ([]*common.SnapshotWithTopologicalOrder, error)
- func (s *BadgerStore) ReadTransaction(hash crypto.Hash) (*common.VersionedTransaction, string, error)
- func (s *BadgerStore) ReadUTXO(hash crypto.Hash, index int) (*common.UTXOWithLock, error)
- func (s *BadgerStore) RemoveGraphEntries(prefix string) error
- func (s *BadgerStore) StartNewRound(node crypto.Hash, number uint64, references *common.RoundLink, ...) error
- func (s *BadgerStore) TopologySequence() uint64
- func (s *BadgerStore) TryToMigrateNodeStateQueue() error
- func (s *BadgerStore) UpdateEmptyHeadRound(node crypto.Hash, number uint64, references *common.RoundLink) error
- func (s *BadgerStore) ValidateGraphEntries(networkId crypto.Hash, depth uint64) (int, int, error)
- func (s *BadgerStore) WriteSnapshot(snap *common.SnapshotWithTopologicalOrder) error
- func (s *BadgerStore) WriteTransaction(ver *common.VersionedTransaction) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerStore ¶
type BadgerStore struct {
// contains filtered or unexported fields
}
func NewBadgerStore ¶
func NewBadgerStore(custom *config.Custom, dir string) (*BadgerStore, error)
func (*BadgerStore) AddNodeOperation ¶ added in v0.3.0
func (s *BadgerStore) AddNodeOperation(tx *common.VersionedTransaction, timestamp, threshold uint64) error
func (*BadgerStore) CacheGetTransaction ¶
func (s *BadgerStore) CacheGetTransaction(hash crypto.Hash) (*common.VersionedTransaction, error)
func (*BadgerStore) CacheListTransactions ¶
func (s *BadgerStore) CacheListTransactions(hook func(tx *common.VersionedTransaction) error) error
func (*BadgerStore) CachePutTransaction ¶
func (s *BadgerStore) CachePutTransaction(tx *common.VersionedTransaction) error
func (*BadgerStore) CheckDepositInput ¶
func (s *BadgerStore) CheckDepositInput(deposit *common.DepositData, tx crypto.Hash) error
func (*BadgerStore) CheckGenesisLoad ¶
func (s *BadgerStore) CheckGenesisLoad(snapshots []*common.SnapshotWithTopologicalOrder) (bool, error)
func (*BadgerStore) CheckGhost ¶
func (s *BadgerStore) CheckGhost(key crypto.Key) (bool, error)
func (*BadgerStore) Close ¶
func (store *BadgerStore) Close() error
func (*BadgerStore) LoadGenesis ¶
func (s *BadgerStore) LoadGenesis(rounds []*common.Round, snapshots []*common.SnapshotWithTopologicalOrder, transactions []*common.VersionedTransaction) error
func (*BadgerStore) LockDepositInput ¶
func (s *BadgerStore) LockDepositInput(deposit *common.DepositData, tx crypto.Hash, fork bool) error
func (*BadgerStore) LockMintInput ¶ added in v0.1.1
func (*BadgerStore) ReadAllNodes ¶ added in v0.5.6
func (s *BadgerStore) ReadAllNodes(offset uint64, withState bool) []*common.Node
func (*BadgerStore) ReadDomains ¶
func (s *BadgerStore) ReadDomains() []common.Domain
func (*BadgerStore) ReadLastMintDistribution ¶ added in v0.1.1
func (s *BadgerStore) ReadLastMintDistribution(group string) (*common.MintDistribution, error)
func (*BadgerStore) ReadMintDistributions ¶ added in v0.1.2
func (s *BadgerStore) ReadMintDistributions(group string, offset, count uint64) ([]*common.MintDistribution, []*common.VersionedTransaction, error)
func (*BadgerStore) ReadSnapshot ¶ added in v0.2.14
func (s *BadgerStore) ReadSnapshot(hash crypto.Hash) (*common.SnapshotWithTopologicalOrder, error)
func (*BadgerStore) ReadSnapshotWithTransactionsSinceTopology ¶ added in v0.1.1
func (s *BadgerStore) ReadSnapshotWithTransactionsSinceTopology(topologyOffset, count uint64) ([]*common.SnapshotWithTopologicalOrder, []*common.VersionedTransaction, error)
func (*BadgerStore) ReadSnapshotsForNodeRound ¶
func (s *BadgerStore) ReadSnapshotsForNodeRound(nodeId crypto.Hash, round uint64) ([]*common.SnapshotWithTopologicalOrder, error)
func (*BadgerStore) ReadSnapshotsSinceTopology ¶
func (s *BadgerStore) ReadSnapshotsSinceTopology(topologyOffset, count uint64) ([]*common.SnapshotWithTopologicalOrder, error)
func (*BadgerStore) ReadTransaction ¶
func (s *BadgerStore) ReadTransaction(hash crypto.Hash) (*common.VersionedTransaction, string, error)
func (*BadgerStore) ReadUTXO ¶
func (s *BadgerStore) ReadUTXO(hash crypto.Hash, index int) (*common.UTXOWithLock, error)
func (*BadgerStore) RemoveGraphEntries ¶ added in v0.1.1
func (s *BadgerStore) RemoveGraphEntries(prefix string) error
func (*BadgerStore) StartNewRound ¶
func (*BadgerStore) TopologySequence ¶
func (s *BadgerStore) TopologySequence() uint64
func (*BadgerStore) TryToMigrateNodeStateQueue ¶ added in v0.9.1
func (s *BadgerStore) TryToMigrateNodeStateQueue() error
func (*BadgerStore) UpdateEmptyHeadRound ¶
func (*BadgerStore) ValidateGraphEntries ¶ added in v0.1.14
func (*BadgerStore) WriteSnapshot ¶
func (s *BadgerStore) WriteSnapshot(snap *common.SnapshotWithTopologicalOrder) error
func (*BadgerStore) WriteTransaction ¶
func (s *BadgerStore) WriteTransaction(ver *common.VersionedTransaction) error
type Store ¶
type Store interface { Close() error TryToMigrateNodeStateQueue() error CheckGenesisLoad(snapshots []*common.SnapshotWithTopologicalOrder) (bool, error) LoadGenesis(rounds []*common.Round, snapshots []*common.SnapshotWithTopologicalOrder, transactions []*common.VersionedTransaction) error ReadAllNodes(offset uint64, withState bool) []*common.Node AddNodeOperation(tx *common.VersionedTransaction, timestamp, threshold uint64) error ReadTransaction(hash crypto.Hash) (*common.VersionedTransaction, string, error) WriteTransaction(tx *common.VersionedTransaction) error StartNewRound(node crypto.Hash, number uint64, references *common.RoundLink, finalStart uint64) error UpdateEmptyHeadRound(node crypto.Hash, number uint64, references *common.RoundLink) error TopologySequence() uint64 ReadUTXO(hash crypto.Hash, index int) (*common.UTXOWithLock, error) LockUTXO(hash crypto.Hash, index int, tx crypto.Hash, fork bool) error CheckDepositInput(deposit *common.DepositData, tx crypto.Hash) error LockDepositInput(deposit *common.DepositData, tx crypto.Hash, fork bool) error CheckGhost(key crypto.Key) (bool, error) ReadSnapshot(hash crypto.Hash) (*common.SnapshotWithTopologicalOrder, error) ReadSnapshotsSinceTopology(offset, count uint64) ([]*common.SnapshotWithTopologicalOrder, error) ReadSnapshotWithTransactionsSinceTopology(topologyOffset, count uint64) ([]*common.SnapshotWithTopologicalOrder, []*common.VersionedTransaction, error) ReadSnapshotsForNodeRound(nodeIdWithNetwork crypto.Hash, round uint64) ([]*common.SnapshotWithTopologicalOrder, error) ReadRound(hash crypto.Hash) (*common.Round, error) ReadLink(from, to crypto.Hash) (uint64, error) WriteSnapshot(*common.SnapshotWithTopologicalOrder) error ReadDomains() []common.Domain CachePutTransaction(tx *common.VersionedTransaction) error CacheGetTransaction(hash crypto.Hash) (*common.VersionedTransaction, error) CacheListTransactions(hook func(tx *common.VersionedTransaction) error) error ReadLastMintDistribution(group string) (*common.MintDistribution, error) LockMintInput(mint *common.MintData, tx crypto.Hash, fork bool) error ReadMintDistributions(group string, offset, count uint64) ([]*common.MintDistribution, []*common.VersionedTransaction, error) RemoveGraphEntries(prefix string) error ValidateGraphEntries(networkId crypto.Hash, depth uint64) (int, int, error) }
Click to show internal directories.
Click to hide internal directories.