cmd/swarm, swarm: added access control functionality (#17404)
Co-authored-by: Janos Guljas <janos@resenje.org> Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com> Co-authored-by: Balint Gabor <balint.g@gmail.com>
This commit is contained in:
@ -85,14 +85,12 @@ type Swarm struct {
|
||||
type SwarmAPI struct {
|
||||
Api *api.API
|
||||
Backend chequebook.Backend
|
||||
PrvKey *ecdsa.PrivateKey
|
||||
}
|
||||
|
||||
func (self *Swarm) API() *SwarmAPI {
|
||||
return &SwarmAPI{
|
||||
Api: self.api,
|
||||
Backend: self.backend,
|
||||
PrvKey: self.privateKey,
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,7 +215,7 @@ func NewSwarm(config *api.Config, mockStore *mock.NodeStore) (self *Swarm, err e
|
||||
pss.SetHandshakeController(self.ps, pss.NewHandshakeParams())
|
||||
}
|
||||
|
||||
self.api = api.NewAPI(self.fileStore, self.dns, resourceHandler)
|
||||
self.api = api.NewAPI(self.fileStore, self.dns, resourceHandler, self.privateKey)
|
||||
// Manifests for Smart Hosting
|
||||
log.Debug(fmt.Sprintf("-> Web3 virtual server API"))
|
||||
|
||||
|
Reference in New Issue
Block a user