netsync: Remove unused RpcServer.

This removes the RpcServer config option from the internal/netsync
package since it is no longer used.  # Please enter the commit message
for your changes. Lines starting
This commit is contained in:
Dave Collins 2021-11-16 01:24:54 -06:00
parent 69a4b62c25
commit 7a60eabd38
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2
2 changed files with 5 additions and 13 deletions

View File

@ -23,7 +23,6 @@ import (
"github.com/decred/dcrd/dcrutil/v4"
"github.com/decred/dcrd/internal/mempool"
"github.com/decred/dcrd/internal/progresslog"
"github.com/decred/dcrd/internal/rpcserver"
peerpkg "github.com/decred/dcrd/peer/v3"
"github.com/decred/dcrd/wire"
)
@ -1743,10 +1742,6 @@ type Config struct {
// TxMemPool specifies the mempool to use for processing transactions.
TxMemPool *mempool.TxPool
// RpcServer returns an instance of an RPC server to use for notifications.
// It may return nil if there is no active RPC server.
RpcServer func() *rpcserver.Server
// NoMiningStateSync indicates whether or not the sync manager should
// perform an initial mining state synchronization with peers once they are
// believed to be fully synced.

View File

@ -3637,14 +3637,11 @@ func newServer(ctx context.Context, listenAddrs []string, db database.DB,
srvrLog.Info("Checkpoints are disabled")
}
s.syncManager = netsync.New(&netsync.Config{
PeerNotifier: &s,
Chain: s.chain,
ChainParams: s.chainParams,
TimeSource: s.timeSource,
TxMemPool: s.txMemPool,
RpcServer: func() *rpcserver.Server {
return s.rpcServer
},
PeerNotifier: &s,
Chain: s.chain,
ChainParams: s.chainParams,
TimeSource: s.timeSource,
TxMemPool: s.txMemPool,
NoMiningStateSync: cfg.NoMiningStateSync,
MaxPeers: cfg.MaxPeers,
MaxOrphanTxs: cfg.MaxOrphanTxs,