Documentation
¶
Index ¶
- Constants
- Variables
- type IndexStore
- func (s *IndexStore) Clone() (StoreImpl, *StoreBase, Store, StoreTx)
- func (s *IndexStore) CreateUTXOs(createUTXOs []spec.UTXO, height int64) error
- func (s *IndexStore) FindUTXOs(kind doge.ScriptType, address []byte) (res []spec.UTXO, err error)
- func (s *IndexStore) GetBalance(kind doge.ScriptType, address []byte, confirmations int64) (res spec.Balance, err error)
- func (s *IndexStore) GetResumePoint() ([]byte, error)
- func (s *IndexStore) RemoveUTXOs(removeUTXOs []spec.OutPointKey, height int64) error
- func (s *IndexStore) SetResumePoint(hash []byte, height int64) error
- func (s *IndexStore) TrimSpentUTXOs(height int64) error
- func (s *IndexStore) UndoAbove(height int64) error
- type Store
- type StoreBase
- type StoreImpl
- type StoreTx
Constants ¶
View Source
const SCHEMA_v0 = `` /* 515-byte string literal not displayed */
SMALLINT is int16, INTEGER is int32, BIGINT is int64 HASH index uses a 4-byte hash of the indexed column, which is lossy/approx but compact kind IN (2,3,5,6) is (TX_PUBKEYHASH,TX_SCRIPTHASH,TX_WITNESS_V0_KEYHASH,TX_WITNESS_V0_SCRIPTHASH)
Variables ¶
View Source
var MIGRATIONS = []storelib.Migration{ {Version: 1, SQL: SCHEMA_v0}, }
Functions ¶
This section is empty.
Types ¶
type IndexStore ¶
type IndexStore struct {
StoreBase
}
func (*IndexStore) Clone ¶
func (s *IndexStore) Clone() (StoreImpl, *StoreBase, Store, StoreTx)
Clone makes a copy of the store implementation (because storelib can't do this part)
func (*IndexStore) CreateUTXOs ¶
func (s *IndexStore) CreateUTXOs(createUTXOs []spec.UTXO, height int64) error
CreateUTXOs inserts new UTXOs at `height` (can replace Removed UTXOs)
func (*IndexStore) FindUTXOs ¶
func (s *IndexStore) FindUTXOs(kind doge.ScriptType, address []byte) (res []spec.UTXO, err error)
func (*IndexStore) GetBalance ¶ added in v0.0.3
func (s *IndexStore) GetBalance(kind doge.ScriptType, address []byte, confirmations int64) (res spec.Balance, err error)
func (*IndexStore) GetResumePoint ¶
func (s *IndexStore) GetResumePoint() ([]byte, error)
func (*IndexStore) RemoveUTXOs ¶
func (s *IndexStore) RemoveUTXOs(removeUTXOs []spec.OutPointKey, height int64) error
RemoveUTXOs marks UTXOs as spent at `height`
func (*IndexStore) SetResumePoint ¶
func (s *IndexStore) SetResumePoint(hash []byte, height int64) error
func (*IndexStore) TrimSpentUTXOs ¶
func (s *IndexStore) TrimSpentUTXOs(height int64) error
TrimSpentUTXOs permanently deletes all 'Removed' UTXOs below `height`
func (*IndexStore) UndoAbove ¶
func (s *IndexStore) UndoAbove(height int64) error
UndoAbove removes created UTXOs and re-activates Removed UTXOs above `height`.
Click to show internal directories.
Click to hide internal directories.