Documentation ¶
Index ¶
- func AccountsInitLightTest(tb testing.TB, db dbForInit, ...) (newDatabase bool, err error)
- func AccountsInitTest(tb testing.TB, db dbForInit, ...) (newDatabase bool)
- func CreatableEntryMaxSize() (s int)
- func MakeAccountsReader(kvr KvRead, proto config.ConsensusParams) *accountsReader
- func MakeAccountsWriter(kvw KvWrite, kvr KvRead) *accountsWriter
- func MakeCatchpoint() trackerdb.Catchpoint
- func MakeOnlineAccountsWriter(kvw KvWrite) trackerdb.OnlineAccountsWriter
- func MakeReader(kvr KvRead, proto config.ConsensusParams) trackerdb.Reader
- func MakeStateproofReader(kvr KvRead) trackerdb.SpVerificationCtxReader
- func MakeStateproofWriter(kvw KvWrite) trackerdb.SpVerificationCtxWriter
- func MakeWriter(store trackerdb.Store, kvw KvWrite, kvr KvRead) trackerdb.Writer
- func RunMigrations(ctx context.Context, db dbForMigrations, params trackerdb.Params, ...) (mgr trackerdb.InitParams, err error)
- type KvIter
- type KvRead
- type KvWrite
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountsInitLightTest ¶
func AccountsInitLightTest(tb testing.TB, db dbForInit, initAccounts map[basics.Address]basics.AccountData, proto config.ConsensusParams) (newDatabase bool, err error)
AccountsInitLightTest initializes the database for testing with the given accounts.
This is duplicate due to a specific legacy test in accdeltas_test.go. TODO: remove the need for this.
func AccountsInitTest ¶
func AccountsInitTest(tb testing.TB, db dbForInit, initAccounts map[basics.Address]basics.AccountData, proto protocol.ConsensusVersion) (newDatabase bool)
AccountsInitTest initializes the database for testing with the given accounts.
func CreatableEntryMaxSize ¶
func CreatableEntryMaxSize() (s int)
MaxSize returns a maximum valid message size for this message type
func MakeAccountsReader ¶
func MakeAccountsReader(kvr KvRead, proto config.ConsensusParams) *accountsReader
MakeAccountsReader returns a kv db agnostic AccountsReader.
func MakeAccountsWriter ¶
MakeAccountsWriter returns a kv db agnostic AccountsWriter. TODO: we should discuss what is the best approach for this `kvr KvRead`. the problem is that `OnlineAccountsDelete` requires reading and writing. the cleanest approach is to move that method to a separate interface, and have it only be available on 'transactions'. although a snapshot+batch should be able to support it too since its all reads, then writes.
func MakeCatchpoint ¶
func MakeCatchpoint() trackerdb.Catchpoint
MakeCatchpoint returns a trackerdb.Catchpoint for a KV
func MakeOnlineAccountsWriter ¶
func MakeOnlineAccountsWriter(kvw KvWrite) trackerdb.OnlineAccountsWriter
MakeOnlineAccountsWriter constructs an kv agnostic OnlineAccountsWriter
func MakeReader ¶
func MakeReader(kvr KvRead, proto config.ConsensusParams) trackerdb.Reader
MakeReader returns a trackerdb.Reader for a KV
func MakeStateproofReader ¶
func MakeStateproofReader(kvr KvRead) trackerdb.SpVerificationCtxReader
MakeStateproofReader returns a trackerdb.SpVerificationCtxReader for a KV
func MakeStateproofWriter ¶
func MakeStateproofWriter(kvw KvWrite) trackerdb.SpVerificationCtxWriter
MakeStateproofWriter returns a trackerdb.SpVerificationCtxWriter for a KV
func MakeWriter ¶
MakeWriter returns a trackerdb.Writer for a KV
func RunMigrations ¶
func RunMigrations(ctx context.Context, db dbForMigrations, params trackerdb.Params, targetVersion int32) (mgr trackerdb.InitParams, err error)
RunMigrations runs the migrations on the store up to the target version.
Types ¶
type KvIter ¶
type KvIter interface { Next() bool Key() []byte KeySlice() Slice Value() ([]byte, error) ValueSlice() (Slice, error) Valid() bool Close() }
KvIter is a low level KV iterator.
type KvRead ¶
type KvRead interface { Get(key []byte) ([]byte, io.Closer, error) NewIter(low, high []byte, reverse bool) KvIter }
KvRead is a low level KV db interface for reading.