20910511e9
- Remove inMainChain from block nodes since that can now be efficiently determined by using the chain view - Track the best chain via a chain view instead of a single block node - Use the tip of the best chain view everywhere bestNode was used - Update chain view tip instead of updating best node - Change reorg logic to use more efficient chain view fork finding logic - Change block locator code over to use more efficient chain view logic - Remove now unused block-index-based block locator code - Move BlockLocator definition to chain.go - Move BlockLocatorFromHash and LatestBlockLocator to chain.go - Update both to use more efficient chain view logic - Rework IsCheckpointCandidate to use block index and chain view - Optimize MainChainHasBlock to use chain view instead of hitting db - Move to chain.go since it no longer involves database I/O - Removed error return since it can no longer fail - Optimize BlockHeightByHash to use chain view instead of hitting db - Move to chain.go since it no longer involves database I/O - Removed error return since it can no longer fail - Optimize BlockHashByHeight to use chain view instead of hitting db - Move to chain.go since it no longer involves database I/O - Removed error return since it can no longer fail - Optimize HeightRange to use chain view instead of hitting db - Move to chain.go since it no longer involves database I/O - Optimize BlockByHeight to use chain view for main chain check - Optimize BlockByHash to use chain view for main chain check |
||
---|---|---|
.. | ||
addrindex.go | ||
addrindex_test.go | ||
blocklogger.go | ||
common.go | ||
log.go | ||
manager.go | ||
README.md | ||
txindex.go |
indexers
Package indexers implements optional block chain indexes.
These indexes are typically used to enhance the amount of information available via an RPC interface.
Supported Indexers
- Transaction-by-hash (txbyhashidx) Index
- Creates a mapping from the hash of each transaction to the block that contains it along with its offset and length within the serialized block
- Transaction-by-address (txbyaddridx) Index
- Creates a mapping from every address to all transactions which either credit or debit the address
- Requires the transaction-by-hash index
Installation
$ go get -u github.com/btcsuite/btcd/blockchain/indexers
License
Package indexers is licensed under the copyfree ISC License.