Hook CBF indexer to server code
This commit is contained in:
parent
9809f4ffdd
commit
3b0038093a
1 changed files with 6 additions and 0 deletions
|
@ -229,6 +229,7 @@ type server struct {
|
|||
// do not need to be protected for concurrent access.
|
||||
txIndex *indexers.TxIndex
|
||||
addrIndex *indexers.AddrIndex
|
||||
cbfIndex *indexers.CBFIndex
|
||||
}
|
||||
|
||||
// serverPeer extends the peer to maintain state shared by the server and
|
||||
|
@ -2236,6 +2237,11 @@ func newServer(listenAddrs []string, db database.DB, chainParams *chaincfg.Param
|
|||
s.addrIndex = indexers.NewAddrIndex(db, chainParams)
|
||||
indexes = append(indexes, s.addrIndex)
|
||||
}
|
||||
if !cfg.NoCBFilters {
|
||||
indxLog.Info("CBF index is enabled")
|
||||
s.cbfIndex = indexers.NewCBFIndex(db)
|
||||
indexes = append(indexes, s.cbfIndex)
|
||||
}
|
||||
|
||||
// Create an index manager if any of the optional indexes are enabled.
|
||||
var indexManager blockchain.IndexManager
|
||||
|
|
Loading…
Reference in a new issue