mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 01:40:07 +01:00
multi: Remove unused code found by deadcode.
This commit is contained in:
parent
1e38d7fd4b
commit
e320330d29
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2013-2014 The btcsuite developers
|
||||
// Copyright (c) 2013-2016 The btcsuite developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -96,8 +96,6 @@ const (
|
||||
// address manager will claim to need more addresses.
|
||||
needAddressThreshold = 1000
|
||||
|
||||
newAddressBufferSize = 50
|
||||
|
||||
// dumpAddressInterval is the interval used to dump the address
|
||||
// cache to disk for future use.
|
||||
dumpAddressInterval = time.Minute * 10
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2013-2014 The btcsuite developers
|
||||
// Copyright (c) 2013-2016 The btcsuite developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -56,16 +56,3 @@ func SetLogWriter(w io.Writer, level string) error {
|
||||
UseLogger(l)
|
||||
return nil
|
||||
}
|
||||
|
||||
// LogClosure is a closure that can be printed with %v to be used to
|
||||
// generate expensive-to-create data for a detailed log level and avoid doing
|
||||
// the work if the data isn't printed.
|
||||
type logClosure func() string
|
||||
|
||||
func (c logClosure) String() string {
|
||||
return c()
|
||||
}
|
||||
|
||||
func newLogClosure(c func() string) logClosure {
|
||||
return logClosure(c)
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
chanBufferSize = 50
|
||||
|
||||
// minInFlightBlocks is the minimum number of blocks that should be
|
||||
// in the request queue for headers-first mode before requesting
|
||||
// more.
|
||||
|
@ -42,7 +42,6 @@ const (
|
||||
defaultMaxRPCClients = 10
|
||||
defaultMaxRPCWebsockets = 25
|
||||
defaultMaxRPCConcurrentReqs = 20
|
||||
defaultVerifyEnabled = false
|
||||
defaultDbType = "ffldb"
|
||||
defaultFreeTxRelayLimit = 15.0
|
||||
defaultBlockMinSize = 0
|
||||
|
22
log.go
22
log.go
@ -22,12 +22,6 @@ import (
|
||||
"github.com/btcsuite/seelog"
|
||||
)
|
||||
|
||||
const (
|
||||
// maxRejectReasonLen is the maximum length of a sanitized reject reason
|
||||
// that will be logged.
|
||||
maxRejectReasonLen = 250
|
||||
)
|
||||
|
||||
// Loggers per subsystem. Note that backendLog is a seelog logger that all of
|
||||
// the subsystem loggers route their messages to. When adding new subsystems,
|
||||
// add a reference here, to the subsystemLoggers map, and the useLogger
|
||||
@ -70,22 +64,6 @@ var subsystemLoggers = map[string]btclog.Logger{
|
||||
"TXMP": txmpLog,
|
||||
}
|
||||
|
||||
// logClosure is used to provide a closure over expensive logging operations
|
||||
// so don't have to be performed when the logging level doesn't warrant it.
|
||||
type logClosure func() string
|
||||
|
||||
// String invokes the underlying function and returns the result.
|
||||
func (c logClosure) String() string {
|
||||
return c()
|
||||
}
|
||||
|
||||
// newLogClosure returns a new closure over a function that returns a string
|
||||
// which itself provides a Stringer interface so that it can be used with the
|
||||
// logging system.
|
||||
func newLogClosure(c func() string) logClosure {
|
||||
return logClosure(c)
|
||||
}
|
||||
|
||||
// useLogger updates the logger references for subsystemID to logger. Invalid
|
||||
// subsystems are ignored.
|
||||
func useLogger(subsystemID string, logger btclog.Logger) {
|
||||
|
Loading…
Reference in New Issue
Block a user