swarm: remove unused/dead code (#18351)
This commit is contained in:
committed by
GitHub
parent
335760bf06
commit
9e9fc87e70
@ -74,8 +74,6 @@ type Swarm struct {
|
||||
bzz *network.Bzz // the logistic manager
|
||||
backend chequebook.Backend // simple blockchain Backend
|
||||
privateKey *ecdsa.PrivateKey
|
||||
corsString string
|
||||
swapEnabled bool
|
||||
netStore *storage.NetStore
|
||||
sfs *fuse.SwarmFS // need this to cleanup all the active mounts on node exit
|
||||
ps *pss.Pss
|
||||
@ -86,18 +84,6 @@ type Swarm struct {
|
||||
tracerClose io.Closer
|
||||
}
|
||||
|
||||
type SwarmAPI struct {
|
||||
Api *api.API
|
||||
Backend chequebook.Backend
|
||||
}
|
||||
|
||||
func (self *Swarm) API() *SwarmAPI {
|
||||
return &SwarmAPI{
|
||||
Api: self.api,
|
||||
Backend: self.backend,
|
||||
}
|
||||
}
|
||||
|
||||
// creates a new swarm service instance
|
||||
// implements node.Service
|
||||
// If mockStore is not nil, it will be used as the storage for chunk data.
|
||||
@ -479,14 +465,6 @@ func (self *Swarm) Protocols() (protos []p2p.Protocol) {
|
||||
return
|
||||
}
|
||||
|
||||
func (self *Swarm) RegisterPssProtocol(spec *protocols.Spec, targetprotocol *p2p.Protocol, options *pss.ProtocolParams) (*pss.Protocol, error) {
|
||||
if !pss.IsActiveProtocol {
|
||||
return nil, fmt.Errorf("Pss protocols not available (built with !nopssprotocol tag)")
|
||||
}
|
||||
topic := pss.ProtocolTopic(spec)
|
||||
return pss.RegisterProtocol(self.ps, &topic, spec, targetprotocol, options)
|
||||
}
|
||||
|
||||
// implements node.Service
|
||||
// APIs returns the RPC API descriptors the Swarm implementation offers
|
||||
func (self *Swarm) APIs() []rpc.API {
|
||||
@ -535,10 +513,6 @@ func (self *Swarm) APIs() []rpc.API {
|
||||
return apis
|
||||
}
|
||||
|
||||
func (self *Swarm) Api() *api.API {
|
||||
return self.api
|
||||
}
|
||||
|
||||
// SetChequebook ensures that the local checquebook is set up on chain.
|
||||
func (self *Swarm) SetChequebook(ctx context.Context) error {
|
||||
err := self.config.Swap.SetChequebook(ctx, self.backend, self.config.Path)
|
||||
|
Reference in New Issue
Block a user