Create a knob to switch CBFs off.
While having them on by default. We may want to revisit this and make no CBFs the default.
This commit is contained in:
parent
d82e76cec9
commit
333af136ef
4 changed files with 10 additions and 1 deletions
|
@ -150,6 +150,7 @@ type config struct {
|
||||||
BlockPrioritySize uint32 `long:"blockprioritysize" description:"Size in bytes for high-priority/low-fee transactions when creating a block"`
|
BlockPrioritySize uint32 `long:"blockprioritysize" description:"Size in bytes for high-priority/low-fee transactions when creating a block"`
|
||||||
UserAgentComments []string `long:"uacomment" description:"Comment to add to the user agent -- See BIP 14 for more information."`
|
UserAgentComments []string `long:"uacomment" description:"Comment to add to the user agent -- See BIP 14 for more information."`
|
||||||
NoPeerBloomFilters bool `long:"nopeerbloomfilters" description:"Disable bloom filtering support"`
|
NoPeerBloomFilters bool `long:"nopeerbloomfilters" description:"Disable bloom filtering support"`
|
||||||
|
NoCBFilters bool `long:"nocbfilters" description:"Disable committed bloom filtering (CBF) support"`
|
||||||
SigCacheMaxSize uint `long:"sigcachemaxsize" description:"The maximum number of entries in the signature verification cache"`
|
SigCacheMaxSize uint `long:"sigcachemaxsize" description:"The maximum number of entries in the signature verification cache"`
|
||||||
BlocksOnly bool `long:"blocksonly" description:"Do not accept transactions from remote peers."`
|
BlocksOnly bool `long:"blocksonly" description:"Do not accept transactions from remote peers."`
|
||||||
TxIndex bool `long:"txindex" description:"Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"`
|
TxIndex bool `long:"txindex" description:"Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"`
|
||||||
|
|
1
doc.go
1
doc.go
|
@ -112,6 +112,7 @@ Application Options:
|
||||||
--blockprioritysize= Size in bytes for high-priority/low-fee transactions
|
--blockprioritysize= Size in bytes for high-priority/low-fee transactions
|
||||||
when creating a block (50000)
|
when creating a block (50000)
|
||||||
--nopeerbloomfilters Disable bloom filtering support.
|
--nopeerbloomfilters Disable bloom filtering support.
|
||||||
|
--nocbfilters Disable committed bloom filtering (CBF) support.
|
||||||
--sigcachemaxsize= The maximum number of entries in the signature
|
--sigcachemaxsize= The maximum number of entries in the signature
|
||||||
verification cache.
|
verification cache.
|
||||||
--blocksonly Do not accept transactions from remote peers.
|
--blocksonly Do not accept transactions from remote peers.
|
||||||
|
|
|
@ -167,6 +167,9 @@
|
||||||
; Must not include characters '/', ':', '(' and ')'.
|
; Must not include characters '/', ':', '(' and ')'.
|
||||||
; uacomment=
|
; uacomment=
|
||||||
|
|
||||||
|
; Disable committed peer bloom filtering (CBF).
|
||||||
|
; nocbfilters=1
|
||||||
|
|
||||||
; ------------------------------------------------------------------------------
|
; ------------------------------------------------------------------------------
|
||||||
; RPC server options - The following options control the built-in RPC server
|
; RPC server options - The following options control the built-in RPC server
|
||||||
; which is used to control and query information from a running btcd process.
|
; which is used to control and query information from a running btcd process.
|
||||||
|
|
|
@ -43,7 +43,8 @@ import (
|
||||||
const (
|
const (
|
||||||
// defaultServices describes the default services that are supported by
|
// defaultServices describes the default services that are supported by
|
||||||
// the server.
|
// the server.
|
||||||
defaultServices = wire.SFNodeNetwork | wire.SFNodeBloom | wire.SFNodeWitness
|
defaultServices = wire.SFNodeNetwork | wire.SFNodeBloom |
|
||||||
|
wire.SFNodeWitness | wire.SFNodeCF
|
||||||
|
|
||||||
// defaultRequiredServices describes the default services that are
|
// defaultRequiredServices describes the default services that are
|
||||||
// required to be supported by outbound peers.
|
// required to be supported by outbound peers.
|
||||||
|
@ -2158,6 +2159,9 @@ func newServer(listenAddrs []string, db database.DB, chainParams *chaincfg.Param
|
||||||
if cfg.NoPeerBloomFilters {
|
if cfg.NoPeerBloomFilters {
|
||||||
services &^= wire.SFNodeBloom
|
services &^= wire.SFNodeBloom
|
||||||
}
|
}
|
||||||
|
if cfg.NoCBFilters {
|
||||||
|
services &^= wire.SFNodeCBF
|
||||||
|
}
|
||||||
|
|
||||||
amgr := addrmgr.New(cfg.DataDir, btcdLookup)
|
amgr := addrmgr.New(cfg.DataDir, btcdLookup)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue