Documentation ¶
Index ¶
- Variables
- func NewPeer(network wire.BitcoinNet, address string) (*peer, error)
- type Config
- type Server
- func (s *Server) BalanceByAddress(ctx context.Context, encodedAddress string) (uint64, error)
- func (s *Server) BlockHeaderByHash(ctx context.Context, hash *chainhash.Hash) (*wire.BlockHeader, uint64, error)
- func (s *Server) BlockHeadersBest(ctx context.Context) (uint64, []*wire.BlockHeader, error)
- func (s *Server) BlockHeadersByHeight(ctx context.Context, height uint64) ([]*wire.BlockHeader, error)
- func (s *Server) DB() tbcd.Database
- func (s *Server) DBClose() error
- func (s *Server) DBOpen(ctx context.Context) error
- func (s *Server) FeesAtHeight(ctx context.Context, height, count int64) (uint64, error)
- func (s *Server) RawBlockHeadersBest(ctx context.Context) (uint64, []api.ByteSlice, error)
- func (s *Server) RawBlockHeadersByHeight(ctx context.Context, height uint64) ([]api.ByteSlice, error)
- func (s *Server) Run(pctx context.Context) error
- func (s *Server) SyncIndexersToHeight(ctx context.Context, height uint64) error
- func (s *Server) Synced(ctx context.Context) (si SyncInfo)
- func (s *Server) TxById(ctx context.Context, txId tbcd.TxId) (*wire.MsgTx, error)
- func (s *Server) TxIndexer(ctx context.Context, height, count uint64) error
- func (s *Server) UtxoIndexer(ctx context.Context, height, count uint64) error
- func (s *Server) UtxosByAddress(ctx context.Context, encodedAddress string, start uint64, count uint64) ([]tbcd.Utxo, error)
- type SyncInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UtxoIndexHeightKey = []byte("utxoindexheight") // last indexed utxo height key TxIndexHeightKey = []byte("txindexheight") // last indexed tx height key )
Functions ¶
Types ¶
type Config ¶
type Config struct { AutoIndex bool BlockSanity bool LevelDBHome string ListenAddress string LogLevel string MaxCachedTxs int Network string PrometheusListenAddress string PprofListenAddress string }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BalanceByAddress ¶
func (*Server) BlockHeaderByHash ¶
func (*Server) BlockHeadersBest ¶
BlockHeadersBest returns the headers for the best known blocks.
func (*Server) BlockHeadersByHeight ¶
func (*Server) DBOpen ¶
DBOpen opens the underlying server database. It has been put in its own function to make it available during tests and hemictl.
func (*Server) FeesAtHeight ¶
func (*Server) RawBlockHeadersBest ¶
RawBlockHeadersBest returns the raw headers for the best known blocks.
func (*Server) RawBlockHeadersByHeight ¶
func (*Server) SyncIndexersToHeight ¶
SyncIndexersToHeight tries to move the various indexers to the suplied height (inclusive).
func (*Server) TxIndexer ¶
TxIndexer starts indexing at start height for count blocks. If count is 0 the indexers will index to tip. It does NOT verify that the provided start height is correct. This is the version of the function that has no training wheels and is meant for internal use only.
func (*Server) UtxoIndexer ¶
Click to show internal directories.
Click to hide internal directories.