Documentation
¶
Index ¶
- type AccountTransactions
- type AccountTransactionsBootstrapper
- func (b *AccountTransactionsBootstrapper) ByAddress(account flow.Address, cursor *access.AccountTransactionCursor) (...)
- func (b *AccountTransactionsBootstrapper) FirstIndexedHeight() (uint64, error)
- func (b *AccountTransactionsBootstrapper) LatestIndexedHeight() (uint64, error)
- func (b *AccountTransactionsBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- func (b *AccountTransactionsBootstrapper) UninitializedFirstHeight() (uint64, bool)
- type ContractDeploymentsBootstrapper
- func (b *ContractDeploymentsBootstrapper) All(cursor *accessmodel.ContractDeploymentsCursor) (storage.ContractDeploymentIterator, error)
- func (b *ContractDeploymentsBootstrapper) ByAddress(account flow.Address, cursor *accessmodel.ContractDeploymentsCursor) (storage.ContractDeploymentIterator, error)
- func (b *ContractDeploymentsBootstrapper) ByContract(account flow.Address, name string) (accessmodel.ContractDeployment, error)
- func (b *ContractDeploymentsBootstrapper) DeploymentsByContract(account flow.Address, name string, ...) (storage.ContractDeploymentIterator, error)
- func (b *ContractDeploymentsBootstrapper) FirstIndexedHeight() (uint64, error)
- func (b *ContractDeploymentsBootstrapper) LatestIndexedHeight() (uint64, error)
- func (b *ContractDeploymentsBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- func (b *ContractDeploymentsBootstrapper) UninitializedFirstHeight() (uint64, bool)
- type ContractDeploymentsIndex
- func (idx *ContractDeploymentsIndex) All(cursor *access.ContractDeploymentsCursor) (storage.ContractDeploymentIterator, error)
- func (idx *ContractDeploymentsIndex) ByAddress(account flow.Address, cursor *access.ContractDeploymentsCursor) (storage.ContractDeploymentIterator, error)
- func (idx *ContractDeploymentsIndex) ByContract(account flow.Address, name string) (access.ContractDeployment, error)
- func (idx *ContractDeploymentsIndex) DeploymentsByContract(account flow.Address, name string, cursor *access.ContractDeploymentsCursor) (storage.ContractDeploymentIterator, error)
- func (idx *ContractDeploymentsIndex) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- type FungibleTokenTransfers
- func (idx *FungibleTokenTransfers) ByAddress(account flow.Address, cursor *access.TransferCursor) (storage.IndexIterator[access.FungibleTokenTransfer, access.TransferCursor], ...)
- func (idx *FungibleTokenTransfers) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- type FungibleTokenTransfersBootstrapper
- func (b *FungibleTokenTransfersBootstrapper) ByAddress(account flow.Address, cursor *access.TransferCursor) (storage.FungibleTokenTransferIterator, error)
- func (b *FungibleTokenTransfersBootstrapper) FirstIndexedHeight() (uint64, error)
- func (b *FungibleTokenTransfersBootstrapper) LatestIndexedHeight() (uint64, error)
- func (b *FungibleTokenTransfersBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- func (b *FungibleTokenTransfersBootstrapper) UninitializedFirstHeight() (uint64, bool)
- type IndexState
- type NonFungibleTokenTransfers
- func (idx *NonFungibleTokenTransfers) ByAddress(account flow.Address, cursor *access.TransferCursor) (storage.IndexIterator[access.NonFungibleTokenTransfer, access.TransferCursor], ...)
- func (idx *NonFungibleTokenTransfers) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- type NonFungibleTokenTransfersBootstrapper
- func (b *NonFungibleTokenTransfersBootstrapper) ByAddress(account flow.Address, cursor *access.TransferCursor) (storage.NonFungibleTokenTransferIterator, error)
- func (b *NonFungibleTokenTransfersBootstrapper) FirstIndexedHeight() (uint64, error)
- func (b *NonFungibleTokenTransfersBootstrapper) LatestIndexedHeight() (uint64, error)
- func (b *NonFungibleTokenTransfersBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- func (b *NonFungibleTokenTransfersBootstrapper) UninitializedFirstHeight() (uint64, bool)
- type ScheduledTransactionsBootstrapper
- func (b *ScheduledTransactionsBootstrapper) All(cursor *access.ScheduledTransactionCursor) (storage.ScheduledTransactionIterator, error)
- func (b *ScheduledTransactionsBootstrapper) ByAddress(account flow.Address, cursor *access.ScheduledTransactionCursor) (storage.ScheduledTransactionIterator, error)
- func (b *ScheduledTransactionsBootstrapper) ByID(id uint64) (access.ScheduledTransaction, error)
- func (b *ScheduledTransactionsBootstrapper) Cancelled(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (b *ScheduledTransactionsBootstrapper) Executed(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (b *ScheduledTransactionsBootstrapper) Failed(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (b *ScheduledTransactionsBootstrapper) FirstIndexedHeight() (uint64, error)
- func (b *ScheduledTransactionsBootstrapper) LatestIndexedHeight() (uint64, error)
- func (b *ScheduledTransactionsBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
- func (b *ScheduledTransactionsBootstrapper) UninitializedFirstHeight() (uint64, bool)
- type ScheduledTransactionsIndex
- func (idx *ScheduledTransactionsIndex) All(cursor *access.ScheduledTransactionCursor) (storage.ScheduledTransactionIterator, error)
- func (idx *ScheduledTransactionsIndex) ByAddress(account flow.Address, cursor *access.ScheduledTransactionCursor) (storage.ScheduledTransactionIterator, error)
- func (idx *ScheduledTransactionsIndex) ByID(id uint64) (access.ScheduledTransaction, error)
- func (idx *ScheduledTransactionsIndex) Cancelled(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (idx *ScheduledTransactionsIndex) Executed(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (idx *ScheduledTransactionsIndex) Failed(lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, ...) error
- func (idx *ScheduledTransactionsIndex) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountTransactions ¶
type AccountTransactions struct {
*IndexState
}
AccountTransactions implements storage.AccountTransactions using Pebble. It provides an index mapping accounts to their transactions, ordered by block height in descending order (newest first).
Key format: [prefix][address][~block_height][tx_index] - prefix: 1 byte (codeAccountTransactions) - address: 8 bytes (flow.Address) - ~block_height: 8 bytes (one's complement for descending sort) - tx_index: 4 bytes (uint32, big-endian)
Heights are stored as one's complement to ensure descending order search. This optimizes for the most common use case of iterating over the most recent transactions, and makes it easy to answer the question "give me the most recent N transactions for this account that meet these criteria".
Value format: storedAccountTransaction - tx_id: 32 bytes (flow.Identifier) - roles: variable length ([]access.TransactionRole)
All read methods are safe for concurrent access. Write methods (Store) must be called sequentially with consecutive heights.
func BootstrapAccountTransactions ¶
func BootstrapAccountTransactions( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, initialStartHeight uint64, txData []access.AccountTransaction, ) (*AccountTransactions, error)
BootstrapAccountTransactions initializes the account transactions index with data from the first block, and returns a new AccountTransactions instance. The caller must hold the storage.LockIndexAccountTransactions lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if any data is found while initializing
func NewAccountTransactions ¶
func NewAccountTransactions(db storage.DB) (*AccountTransactions, error)
NewAccountTransactions creates a new AccountTransactions backed by the given database.
If the index has not been initialized, constuction will fail with storage.ErrNotBootstrapped. The caller should retry with `BootstrapAccountTransactions` passing the required initialization data.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*AccountTransactions) ByAddress ¶ added in v0.48.0
func (idx *AccountTransactions) ByAddress( account flow.Address, cursor *access.AccountTransactionCursor, ) (storage.IndexIterator[access.AccountTransaction, access.AccountTransactionCursor], error)
ByAddress returns an iterator over transactions for the given account, ordered in descending block height (newest first), with ascending transaction index within each block. Returns an exhausted iterator and no error if the account has no transactions.
`cursor` is a pointer to an access.AccountTransactionCursor:
- nil means start from the latest indexed height
- non-nil means start at the cursor position (inclusive)
Expected error returns during normal operations:
- storage.ErrHeightNotIndexed if the cursor height extends beyond indexed heights
func (*AccountTransactions) Store ¶
func (idx *AccountTransactions) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, txData []access.AccountTransaction) error
Store indexes all account-transaction associations for a block. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexAccountTransactions lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if the block height is already indexed
type AccountTransactionsBootstrapper ¶
type AccountTransactionsBootstrapper struct {
// contains filtered or unexported fields
}
AccountTransactionsBootstrapper wraps an AccountTransactions and performs just-in-time initialization of the index when the initial block is provided.
Account transactions are indexed from execution data which may not be available for the root block during bootstrapping. This module acts as a proxy for the underlying AccountTransactions and encapsulates the complexity of initializing the index when the initial block is eventually provided.
func NewAccountTransactionsBootstrapper ¶
func NewAccountTransactionsBootstrapper(db storage.DB, initialStartHeight uint64) (*AccountTransactionsBootstrapper, error)
NewAccountTransactionsBootstrapper creates a new account transactions bootstrapper.
No error returns are expected during normal operation.
func (*AccountTransactionsBootstrapper) ByAddress ¶ added in v0.48.0
func (b *AccountTransactionsBootstrapper) ByAddress( account flow.Address, cursor *access.AccountTransactionCursor, ) (storage.IndexIterator[access.AccountTransaction, access.AccountTransactionCursor], error)
ByAddress returns an iterator over transactions for the given account. See AccountTransactions.ByAddress for full documentation.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrHeightNotIndexed if the cursor height extends beyond indexed heights
func (*AccountTransactionsBootstrapper) FirstIndexedHeight ¶
func (b *AccountTransactionsBootstrapper) FirstIndexedHeight() (uint64, error)
FirstIndexedHeight returns the first (oldest) block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*AccountTransactionsBootstrapper) LatestIndexedHeight ¶
func (b *AccountTransactionsBootstrapper) LatestIndexedHeight() (uint64, error)
LatestIndexedHeight returns the latest block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*AccountTransactionsBootstrapper) Store ¶
func (b *AccountTransactionsBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, txData []access.AccountTransaction) error
Store indexes all account-transaction associations for a block. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexAccountTransactions lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized and the provided block height is not the initial start height
- storage.ErrAlreadyExists if the block height is already indexed
func (*AccountTransactionsBootstrapper) UninitializedFirstHeight ¶
func (b *AccountTransactionsBootstrapper) UninitializedFirstHeight() (uint64, bool)
UninitializedFirstHeight returns the height the index will accept as the first height, and a boolean indicating if the index is initialized. If the index is not initialized, the first call to `Store` must include data for this height.
type ContractDeploymentsBootstrapper ¶ added in v0.48.0
type ContractDeploymentsBootstrapper struct {
// contains filtered or unexported fields
}
ContractDeploymentsBootstrapper wraps a ContractDeploymentsIndex and performs just-in-time initialization of the index when the initial block is provided.
Contract deployments may not be available for the root block during bootstrapping. This struct acts as a proxy for the underlying ContractDeploymentsIndex and encapsulates the complexity of initializing the index when the initial block is eventually provided.
func NewContractDeploymentsBootstrapper ¶ added in v0.48.0
func NewContractDeploymentsBootstrapper(db storage.DB, initialStartHeight uint64) (*ContractDeploymentsBootstrapper, error)
NewContractDeploymentsBootstrapper creates a new contract deployments bootstrapper.
No error returns are expected during normal operation.
func (*ContractDeploymentsBootstrapper) All ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) All( cursor *accessmodel.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
All returns an iterator over the latest deployment for each indexed contract. See ContractDeploymentsIndex.All.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ContractDeploymentsBootstrapper) ByAddress ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) ByAddress( account flow.Address, cursor *accessmodel.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
ByAddress returns an iterator over the latest deployment for each contract deployed by the given address. See ContractDeploymentsIndex.ByAddress.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ContractDeploymentsBootstrapper) ByContract ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) ByContract(account flow.Address, name string) (accessmodel.ContractDeployment, error)
ByContract returns the most recent deployment for the given contract. See ContractDeploymentsIndex.ByContract.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrNotFound if no deployment for the given contract exists
func (*ContractDeploymentsBootstrapper) DeploymentsByContract ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) DeploymentsByContract( account flow.Address, name string, cursor *accessmodel.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
DeploymentsByContract returns an iterator over all recorded deployments for the given contract, ordered from most recent to oldest. See ContractDeploymentsIndex.DeploymentsByContract.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ContractDeploymentsBootstrapper) FirstIndexedHeight ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) FirstIndexedHeight() (uint64, error)
FirstIndexedHeight returns the first (oldest) block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ContractDeploymentsBootstrapper) LatestIndexedHeight ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) LatestIndexedHeight() (uint64, error)
LatestIndexedHeight returns the latest block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ContractDeploymentsBootstrapper) Store ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) Store( lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, deployments []accessmodel.ContractDeployment, ) error
Store indexes all contract deployments from the given block and advances the latest indexed height to blockHeight. Must be called with consecutive heights. The caller must hold the storage.LockIndexContractDeployments lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized and the provided block height is not the initial start height
- storage.ErrAlreadyExists if the block height is already indexed
func (*ContractDeploymentsBootstrapper) UninitializedFirstHeight ¶ added in v0.48.0
func (b *ContractDeploymentsBootstrapper) UninitializedFirstHeight() (uint64, bool)
UninitializedFirstHeight returns the height the index will accept as the first height, and a boolean indicating if the index is initialized. If the index is not initialized, the first call to Store must include data for this height.
type ContractDeploymentsIndex ¶ added in v0.48.0
type ContractDeploymentsIndex struct {
*IndexState
}
ContractDeploymentsIndex implements storage.ContractDeploymentsIndex.
Primary index key format:
[codeContractDeployment][address bytes(8)][contract name][~height(8)][txIndex(4)][eventIndex(4)]
The one's complement of height (~height) ensures that the most recent deployment (highest height) has the smallest byte value, so it appears first during ascending key iteration.
[All] and [ByAddress] use [BuildPrefixIterator] over the primary index with the prefix [codeContractDeployment][address bytes(8)][contract name], which yields exactly one entry (the most recent deployment) per contract without a separate secondary index.
All read methods are safe for concurrent access. Write methods must be called sequentially.
func BootstrapContractDeployments ¶ added in v0.48.0
func BootstrapContractDeployments( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, initialStartHeight uint64, deployments []access.ContractDeployment, ) (*ContractDeploymentsIndex, error)
BootstrapContractDeployments initializes the index with the given start height and initial contract deployments, and returns a new ContractDeploymentsIndex. The caller must hold the storage.LockIndexContractDeployments lock until the batch is committed.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if any bounds key already exists
func NewContractDeploymentsIndex ¶ added in v0.48.0
func NewContractDeploymentsIndex(db storage.DB) (*ContractDeploymentsIndex, error)
NewContractDeploymentsIndex creates a new index backed by db.
Expected error returns during normal operation:
- storage.ErrNotBootstrapped: if the index has not been initialized
func (*ContractDeploymentsIndex) All ¶ added in v0.48.0
func (idx *ContractDeploymentsIndex) All( cursor *access.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
All returns an iterator over the latest deployment for each indexed contract, ordered by contract identifier (ascending).
cursor is a pointer to an access.ContractDeploymentsCursor:
- nil means start from the first contract (by identifier)
- non-nil resumes from (cursor.Address, cursor.ContractName) (inclusive); other cursor fields are ignored
Returns an exhausted iterator (zero items) and no error if no contracts exist.
No error returns are expected during normal operation.
func (*ContractDeploymentsIndex) ByAddress ¶ added in v0.48.0
func (idx *ContractDeploymentsIndex) ByAddress( account flow.Address, cursor *access.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
ByAddress returns an iterator over the latest deployment for each contract deployed by the given address, ordered by contract identifier (ascending).
cursor is a pointer to an access.ContractDeploymentsCursor:
- nil means start from the first contract at the address (by identifier)
- non-nil resumes from (cursor.Address, cursor.ContractName) (inclusive); other cursor fields are ignored
Returns an exhausted iterator (zero items) and no error if no deployments exist for the given address.
No error returns are expected during normal operation.
func (*ContractDeploymentsIndex) ByContract ¶ added in v0.48.0
func (idx *ContractDeploymentsIndex) ByContract(account flow.Address, name string) (access.ContractDeployment, error)
ByContract returns the most recent deployment for the given contract.
Expected error returns during normal operation:
- storage.ErrNotFound: if no deployment for the given contract exists
func (*ContractDeploymentsIndex) DeploymentsByContract ¶ added in v0.48.0
func (idx *ContractDeploymentsIndex) DeploymentsByContract( account flow.Address, name string, cursor *access.ContractDeploymentsCursor, ) (storage.ContractDeploymentIterator, error)
DeploymentsByContract returns an iterator over all recorded deployments for the given contract, ordered from most recent to oldest (descending block height).
cursor is a pointer to an access.ContractDeploymentsCursor:
- nil means start from the most recent deployment
- non-nil means start at the cursor position (inclusive)
Returns an exhausted iterator (zero items) and no error if no deployments exist for the given contract.
No error returns are expected during normal operation.
func (*ContractDeploymentsIndex) Store ¶ added in v0.48.0
func (idx *ContractDeploymentsIndex) Store( lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, deployments []access.ContractDeployment, ) error
Store indexes all contract deployments from the given block and advances the latest indexed height to blockHeight. Must be called with consecutive block heights. The caller must hold the storage.LockIndexContractDeployments lock until the batch is committed.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if blockHeight has already been indexed
type FungibleTokenTransfers ¶ added in v0.48.0
type FungibleTokenTransfers struct {
*IndexState
}
FungibleTokenTransfers implements storage.FungibleTokenTransfers using Pebble. It provides an index mapping accounts to their fungible token transfers, ordered by block height in descending order (newest first).
Each transfer is indexed under both the source and recipient addresses.
Key format: [prefix][address][~block_height][tx_index][event_index] - prefix: 1 byte (codeFungibleTokenTransfers) - address: 8 bytes (flow.Address) - ~block_height: 8 bytes (one's complement for descending sort) - tx_index: 4 bytes (uint32, big-endian) - event_index: 4 bytes (uint32, big-endian)
Heights are stored as one's complement to ensure descending order search. This optimizes for the most common use case of iterating over the most recent transfers, and makes it easy to answer the question "give me the most recent N transfers for this account that meet these criteria".
Value format: [storedFungibleTokenTransfer]
All read methods are safe for concurrent access. Write methods (Store) must be called sequentially with consecutive heights.
func BootstrapFungibleTokenTransfers ¶ added in v0.48.0
func BootstrapFungibleTokenTransfers( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, initialStartHeight uint64, transfers []access.FungibleTokenTransfer, ) (*FungibleTokenTransfers, error)
BootstrapFungibleTokenTransfers initializes the fungible token transfer index with data from the first block, and returns a new FungibleTokenTransfers instance. The caller must hold the storage.LockIndexFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if data is found while initializing
func NewFungibleTokenTransfers ¶ added in v0.48.0
func NewFungibleTokenTransfers(db storage.DB) (*FungibleTokenTransfers, error)
NewFungibleTokenTransfers creates a new FungibleTokenTransfers backed by the given database.
If the index has not been initialized, construction will fail with storage.ErrNotBootstrapped. The caller should retry with BootstrapFungibleTokenTransfers passing the required initialization data.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*FungibleTokenTransfers) ByAddress ¶ added in v0.48.0
func (idx *FungibleTokenTransfers) ByAddress( account flow.Address, cursor *access.TransferCursor, ) (storage.IndexIterator[access.FungibleTokenTransfer, access.TransferCursor], error)
ByAddress returns an iterator over fungible token transfers involving the given account, ordered in descending block height (newest first), with ascending transaction and event index within each block. Returns an exhausted iterator and no error if the account has no transfers.
`cursor` is a pointer to an access.TransferCursor:
- nil means start from the latest indexed height
- non-nil means start at the cursor position (inclusive)
Expected error returns during normal operations:
- storage.ErrHeightNotIndexed if the cursor height extends beyond indexed heights
func (*FungibleTokenTransfers) Store ¶ added in v0.48.0
func (idx *FungibleTokenTransfers) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, transfers []access.FungibleTokenTransfer) error
Store indexes all fungible token transfers for a block. Each transfer is indexed under both the source and recipient addresses. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if the block height is already indexed
type FungibleTokenTransfersBootstrapper ¶ added in v0.48.0
type FungibleTokenTransfersBootstrapper struct {
// contains filtered or unexported fields
}
FungibleTokenTransfersBootstrapper wraps a FungibleTokenTransfers and performs just-in-time initialization of the index when the initial block is provided.
Fungible token transfers are indexed from execution data which may not be available for the root block during bootstrapping. This module acts as a proxy for the underlying FungibleTokenTransfers and encapsulates the complexity of initializing the index when the initial block is eventually provided.
func NewFungibleTokenTransfersBootstrapper ¶ added in v0.48.0
func NewFungibleTokenTransfersBootstrapper(db storage.DB, initialStartHeight uint64) (*FungibleTokenTransfersBootstrapper, error)
NewFungibleTokenTransfersBootstrapper creates a new FungibleTokenTransfersBootstrapper. If the index is already initialized (from a previous run), the underlying store is loaded immediately. Otherwise, the store remains nil until the first call to [Store] with the initial start height.
No error returns are expected during normal operation.
func (*FungibleTokenTransfersBootstrapper) ByAddress ¶ added in v0.48.0
func (b *FungibleTokenTransfersBootstrapper) ByAddress( account flow.Address, cursor *access.TransferCursor, ) (storage.FungibleTokenTransferIterator, error)
ByAddress returns an iterator over fungible token transfers involving the given account. See FungibleTokenTransfers.ByAddress for full documentation.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrHeightNotIndexed if the cursor height extends beyond indexed heights
func (*FungibleTokenTransfersBootstrapper) FirstIndexedHeight ¶ added in v0.48.0
func (b *FungibleTokenTransfersBootstrapper) FirstIndexedHeight() (uint64, error)
FirstIndexedHeight returns the first (oldest) block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*FungibleTokenTransfersBootstrapper) LatestIndexedHeight ¶ added in v0.48.0
func (b *FungibleTokenTransfersBootstrapper) LatestIndexedHeight() (uint64, error)
LatestIndexedHeight returns the latest block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*FungibleTokenTransfersBootstrapper) Store ¶ added in v0.48.0
func (b *FungibleTokenTransfersBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, transfers []access.FungibleTokenTransfer) error
Store indexes all fungible token transfers for a block. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized and the provided block height is not the initial start height
- storage.ErrAlreadyExists if the block height is already indexed
func (*FungibleTokenTransfersBootstrapper) UninitializedFirstHeight ¶ added in v0.48.0
func (b *FungibleTokenTransfersBootstrapper) UninitializedFirstHeight() (uint64, bool)
UninitializedFirstHeight returns the height the index will accept as the first height, and a boolean indicating if the index is initialized. If the index is not initialized, the first call to `Store` must include data for this height.
type IndexState ¶ added in v0.48.0
type IndexState struct {
// contains filtered or unexported fields
}
IndexState manages height tracking for a block-height-indexed store. Concrete index types embed *IndexState to inherit height management.
All read methods are safe for concurrent access. Write methods (PrepareStore) must be called sequentially, and the caller must hold the required lock until the batch is committed.
func BootstrapIndexState ¶ added in v0.48.0
func BootstrapIndexState( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, requiredLock string, lowerBoundKey, upperBoundKey []byte, initialStartHeight uint64, ) (*IndexState, error)
Bootstrap writes the bounds keys at initialStartHeight to the batch and returns a new IndexState. The caller is responsible for writing initial items to the same batch before committing.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if either bounds key already exists
func NewIndexState ¶ added in v0.48.0
func NewIndexState(db storage.DB, requiredLock string, lowerBoundKey, upperBoundKey []byte) (*IndexState, error)
New reads the first and latest heights from the DB and returns a new IndexState.
Expected error returns during normal operation:
- storage.ErrNotBootstrapped: if the index has not been initialized
func (*IndexState) FirstIndexedHeight ¶ added in v0.48.0
func (s *IndexState) FirstIndexedHeight() uint64
FirstIndexedHeight returns the first (oldest) indexed height.
func (*IndexState) LatestIndexedHeight ¶ added in v0.48.0
func (s *IndexState) LatestIndexedHeight() uint64
LatestIndexedHeight returns the latest indexed height.
func (*IndexState) PrepareStore ¶ added in v0.48.0
func (s *IndexState) PrepareStore(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64) error
PrepareStore validates that blockHeight is the next consecutive height, verifies the required lock is held, writes the upper bound key update to the batch, and registers an OnCommitSucceed callback to advance the in-memory latestHeight.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if blockHeight is already indexed
type NonFungibleTokenTransfers ¶ added in v0.48.0
type NonFungibleTokenTransfers struct {
*IndexState
}
NonFungibleTokenTransfers implements storage.NonFungibleTokenTransfers using Pebble. It provides an index mapping accounts to their non-fungible token transfers, ordered by block height in descending order (newest first).
Each transfer is indexed under both the source and recipient addresses.
Key format: [prefix][address][~block_height][tx_index][event_index] - prefix: 1 byte (codeNonFungibleTokenTransfers) - address: 8 bytes (flow.Address) - ~block_height: 8 bytes (one's complement for descending sort) - tx_index: 4 bytes (uint32, big-endian) - event_index: 4 bytes (uint32, big-endian)
Heights are stored as one's complement to ensure descending order search. This optimizes for the most common use case of iterating over the most recent transfers, and makes it easy to answer the question "give me the most recent N transfers for this account that meet these criteria".
Value format: [storedNonFungibleTokenTransfer]
All read methods are safe for concurrent access. Write methods (Store) must be called sequentially with consecutive heights.
func BootstrapNonFungibleTokenTransfers ¶ added in v0.48.0
func BootstrapNonFungibleTokenTransfers( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, initialStartHeight uint64, transfers []access.NonFungibleTokenTransfer, ) (*NonFungibleTokenTransfers, error)
BootstrapNonFungibleTokenTransfers initializes the non-fungible token transfer index with data from the first block, and returns a new NonFungibleTokenTransfers instance. The caller must hold the storage.LockIndexNonFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if data is found while initializing
func NewNonFungibleTokenTransfers ¶ added in v0.48.0
func NewNonFungibleTokenTransfers(db storage.DB) (*NonFungibleTokenTransfers, error)
NewNonFungibleTokenTransfers creates a new NonFungibleTokenTransfers backed by the given database.
If the index has not been initialized, construction will fail with storage.ErrNotBootstrapped. The caller should retry with BootstrapNonFungibleTokenTransfers passing the required initialization data.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*NonFungibleTokenTransfers) ByAddress ¶ added in v0.48.0
func (idx *NonFungibleTokenTransfers) ByAddress( account flow.Address, cursor *access.TransferCursor, ) (storage.IndexIterator[access.NonFungibleTokenTransfer, access.TransferCursor], error)
ByAddress returns an iterator over non-fungible token transfers involving the given account, ordered in descending block height (newest first), with ascending transaction and event index within each block. Returns an exhausted iterator and no error if the account has no transfers.
`cursor` is a pointer to an access.TransferCursor:
- nil means start from the latest indexed height
- non-nil means start at the cursor position (inclusive)
Expected error returns during normal operations:
- storage.ErrHeightNotIndexed if the cursor height is outside of the indexed range
func (*NonFungibleTokenTransfers) Store ¶ added in v0.48.0
func (idx *NonFungibleTokenTransfers) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, transfers []access.NonFungibleTokenTransfer) error
Store indexes all non-fungible token transfers for a block. Each transfer is indexed under both the source and recipient addresses. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexNonFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrAlreadyExists if the block height is already indexed
type NonFungibleTokenTransfersBootstrapper ¶ added in v0.48.0
type NonFungibleTokenTransfersBootstrapper struct {
// contains filtered or unexported fields
}
NonFungibleTokenTransfersBootstrapper wraps a NonFungibleTokenTransfers and performs just-in-time initialization of the index when the initial block is provided.
Non-fungible token transfers are indexed from execution data which may not be available for the root block during bootstrapping. This module acts as a proxy for the underlying NonFungibleTokenTransfers and encapsulates the complexity of initializing the index when the initial block is eventually provided.
func NewNonFungibleTokenTransfersBootstrapper ¶ added in v0.48.0
func NewNonFungibleTokenTransfersBootstrapper(db storage.DB, initialStartHeight uint64) (*NonFungibleTokenTransfersBootstrapper, error)
NewNonFungibleTokenTransfersBootstrapper creates a new NonFungibleTokenTransfersBootstrapper. If the index is already initialized (from a previous run), the underlying store is loaded immediately. Otherwise, the store remains nil until the first call to [Store] with the initial start height.
No error returns are expected during normal operation.
func (*NonFungibleTokenTransfersBootstrapper) ByAddress ¶ added in v0.48.0
func (b *NonFungibleTokenTransfersBootstrapper) ByAddress( account flow.Address, cursor *access.TransferCursor, ) (storage.NonFungibleTokenTransferIterator, error)
ByAddress returns an iterator over non-fungible token transfers involving the given account. See NonFungibleTokenTransfers.ByAddress for full documentation.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrHeightNotIndexed if the cursor height extends beyond indexed heights
func (*NonFungibleTokenTransfersBootstrapper) FirstIndexedHeight ¶ added in v0.48.0
func (b *NonFungibleTokenTransfersBootstrapper) FirstIndexedHeight() (uint64, error)
FirstIndexedHeight returns the first (oldest) block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*NonFungibleTokenTransfersBootstrapper) LatestIndexedHeight ¶ added in v0.48.0
func (b *NonFungibleTokenTransfersBootstrapper) LatestIndexedHeight() (uint64, error)
LatestIndexedHeight returns the latest block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*NonFungibleTokenTransfersBootstrapper) Store ¶ added in v0.48.0
func (b *NonFungibleTokenTransfersBootstrapper) Store(lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, transfers []access.NonFungibleTokenTransfer) error
Store indexes all non-fungible token transfers for a block. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexNonFungibleTokenTransfers lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized and the provided block height is not the initial start height
- storage.ErrAlreadyExists if the block height is already indexed
func (*NonFungibleTokenTransfersBootstrapper) UninitializedFirstHeight ¶ added in v0.48.0
func (b *NonFungibleTokenTransfersBootstrapper) UninitializedFirstHeight() (uint64, bool)
UninitializedFirstHeight returns the height the index will accept as the first height, and a boolean indicating if the index is initialized. If the index is not initialized, the first call to `Store` must include data for this height.
type ScheduledTransactionsBootstrapper ¶ added in v0.48.0
type ScheduledTransactionsBootstrapper struct {
// contains filtered or unexported fields
}
ScheduledTransactionsBootstrapper wraps a ScheduledTransactionsIndex and performs just-in-time initialization of the index when the initial block is provided.
Scheduled transactions may not be available for the root block during bootstrapping. This struct acts as a proxy for the underlying ScheduledTransactionsIndex and encapsulates the complexity of initializing the index when the initial block is eventually provided.
func NewScheduledTransactionsBootstrapper ¶ added in v0.48.0
func NewScheduledTransactionsBootstrapper(db storage.DB, initialStartHeight uint64) (*ScheduledTransactionsBootstrapper, error)
NewScheduledTransactionsBootstrapper creates a new scheduled transactions bootstrapper.
No error returns are expected during normal operation.
func (*ScheduledTransactionsBootstrapper) All ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) All( cursor *access.ScheduledTransactionCursor, ) (storage.ScheduledTransactionIterator, error)
All returns an iterator over all scheduled transactions. See ScheduledTransactionsIndex.All for full documentation.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ScheduledTransactionsBootstrapper) ByAddress ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) ByAddress( account flow.Address, cursor *access.ScheduledTransactionCursor, ) (storage.ScheduledTransactionIterator, error)
ByAddress returns an iterator over scheduled transactions for the given account. See ScheduledTransactionsIndex.ByAddress for full documentation.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ScheduledTransactionsBootstrapper) ByID ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) ByID(id uint64) (access.ScheduledTransaction, error)
ByID returns the scheduled transaction with the given scheduler-assigned ID.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrNotFound if no scheduled transaction with the given ID exists
func (*ScheduledTransactionsBootstrapper) Cancelled ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) Cancelled( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, feesReturned uint64, feesDeducted uint64, transactionID flow.Identifier, ) error
Cancelled updates the scheduled transaction's status to Cancelled and records the fee amounts and the ID of the transaction that emitted the Canceled event. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrNotFound if no scheduled transaction with the given ID exists
- storage.ErrInvalidStatusTransition if the transaction is already Executed, Cancelled, or Failed
func (*ScheduledTransactionsBootstrapper) Executed ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) Executed( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, transactionID flow.Identifier, ) error
Executed updates the scheduled transaction's status to Executed and records the ID of the transaction that emitted the Executed event. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrNotFound if no scheduled transaction with the given ID exists
- storage.ErrInvalidStatusTransition if the transaction is already Executed, Cancelled, or Failed
func (*ScheduledTransactionsBootstrapper) Failed ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) Failed( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, transactionID flow.Identifier, ) error
Failed updates the transaction's status to Failed and records the ID of the transaction that emitted the Failed event. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
- storage.ErrNotFound if no scheduled transaction with the given ID exists
- storage.ErrInvalidStatusTransition if the transaction is already Executed, Cancelled, or Failed
func (*ScheduledTransactionsBootstrapper) FirstIndexedHeight ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) FirstIndexedHeight() (uint64, error)
FirstIndexedHeight returns the first (oldest) block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ScheduledTransactionsBootstrapper) LatestIndexedHeight ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) LatestIndexedHeight() (uint64, error)
LatestIndexedHeight returns the latest block height that has been indexed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized
func (*ScheduledTransactionsBootstrapper) Store ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) Store( lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, scheduledTxs []access.ScheduledTransaction, ) error
Store indexes all new scheduled transactions from the given block. Must be called sequentially with consecutive heights (latestHeight + 1). The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until the batch is committed.
Expected error returns during normal operations:
- storage.ErrNotBootstrapped if the index has not been initialized and the provided block height is not the initial start height
- storage.ErrAlreadyExists if the block height is already indexed
func (*ScheduledTransactionsBootstrapper) UninitializedFirstHeight ¶ added in v0.48.0
func (b *ScheduledTransactionsBootstrapper) UninitializedFirstHeight() (uint64, bool)
UninitializedFirstHeight returns the height the index will accept as the first height, and a boolean indicating if the index is initialized. If the index is not initialized, the first call to `Store` must include data for this height.
type ScheduledTransactionsIndex ¶ added in v0.48.0
type ScheduledTransactionsIndex struct {
*IndexState
}
ScheduledTransactionsIndex implements storage.ScheduledTransactionsIndex using Pebble.
Primary key format: [codeScheduledTransaction][~id] → ScheduledTransaction value By-address key format: [codeScheduledTransactionByAddress][addr][~id] → nil (key-only)
One's complement of id (~id) gives descending iteration order in ascending byte space.
All read methods are safe for concurrent access. Write methods must be called sequentially.
func BootstrapScheduledTransactions ¶ added in v0.48.0
func BootstrapScheduledTransactions( lctx lockctx.Proof, rw storage.ReaderBatchWriter, db storage.DB, initialStartHeight uint64, scheduledTxs []access.ScheduledTransaction, ) (*ScheduledTransactionsIndex, error)
BootstrapScheduledTransactions initializes the index with the given start height and initial scheduled transactions, and returns a new ScheduledTransactionsIndex. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until the batch is committed.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if any bounds key already exists
func NewScheduledTransactionsIndex ¶ added in v0.48.0
func NewScheduledTransactionsIndex(db storage.DB) (*ScheduledTransactionsIndex, error)
NewScheduledTransactionsIndex creates a new index backed by db.
Expected error returns during normal operation:
- storage.ErrNotBootstrapped: if the index has not been initialized
func (*ScheduledTransactionsIndex) All ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) All( cursor *access.ScheduledTransactionCursor, ) (storage.ScheduledTransactionIterator, error)
All returns an iterator over all scheduled transactions in descending ID order. Returns an exhausted iterator and no error if no transactions exist.
`cursor` is a pointer to an access.ScheduledTransactionCursor:
- nil means start from the highest indexed ID
- non-nil means start at the cursor ID (inclusive)
No error returns are expected during normal operation.
func (*ScheduledTransactionsIndex) ByAddress ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) ByAddress( account flow.Address, cursor *access.ScheduledTransactionCursor, ) (storage.ScheduledTransactionIterator, error)
ByAddress returns an iterator over scheduled transactions for the given account in descending ID order. Returns an exhausted iterator and no error if the account has no transactions.
`cursor` is a pointer to an access.ScheduledTransactionCursor:
- nil means start from the highest indexed ID
- non-nil means start at the cursor ID (inclusive)
No error returns are expected during normal operation.
func (*ScheduledTransactionsIndex) ByID ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) ByID(id uint64) (access.ScheduledTransaction, error)
ByID returns the scheduled transaction with the given ID.
Expected error returns during normal operation:
- storage.ErrNotFound: if no scheduled transaction with the given ID exists
func (*ScheduledTransactionsIndex) Cancelled ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) Cancelled( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, feesReturned uint64, feesDeducted uint64, transactionID flow.Identifier, ) error
Cancelled updates the transaction's status to Cancelled and records fee amounts and the ID of the transaction that emitted the Canceled event. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until committed.
Expected error returns during normal operation:
- storage.ErrNotFound: if no entry with the given ID exists
- storage.ErrInvalidStatusTransition: if the transaction is already Executed, Cancelled, or Failed
func (*ScheduledTransactionsIndex) Executed ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) Executed( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, transactionID flow.Identifier, ) error
Executed updates the transaction's status to Executed and records the ID of the transaction that emitted the Executed event. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until committed.
Expected error returns during normal operation:
- storage.ErrNotFound: if no entry with the given ID exists
- storage.ErrInvalidStatusTransition: if the transaction is already Cancelled, Executed, or Failed
func (*ScheduledTransactionsIndex) Failed ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) Failed( lctx lockctx.Proof, rw storage.ReaderBatchWriter, scheduledTxID uint64, transactionID flow.Identifier, ) error
Failed updates the transaction's status to Failed and records the ID of the executor transaction that attempted (and failed) to execute the scheduled transaction. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until committed.
Expected error returns during normal operation:
- storage.ErrNotFound: if no entry with the given ID exists
- storage.ErrInvalidStatusTransition: if the transaction is already Executed, Cancelled, or Failed
func (*ScheduledTransactionsIndex) Store ¶ added in v0.48.0
func (idx *ScheduledTransactionsIndex) Store( lctx lockctx.Proof, rw storage.ReaderBatchWriter, blockHeight uint64, scheduledTxs []access.ScheduledTransaction, ) error
Store indexes new scheduled transactions from the block and advances the latest indexed height. Must be called with consecutive block heights. The caller must hold the storage.LockIndexScheduledTransactionsIndex lock until committed.
Expected error returns during normal operation:
- storage.ErrAlreadyExists: if blockHeight is already indexed
Source Files
¶
- account_ft_transfers.go
- account_ft_transfers_bootstrapper.go
- account_nft_transfers.go
- account_nft_transfers_bootstrapper.go
- account_transactions.go
- account_transactions_bootstrapper.go
- contracts.go
- contracts_bootstrapper.go
- helpers.go
- prefix.go
- scheduled_transactions.go
- scheduled_transactions_bootstrapper.go
- state.go