From 4d6fdb5e5d63eff21b304059ad5e8d7aacf28252 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 22 Mar 2019 16:05:37 +0100 Subject: [PATCH] swarm/network: Rename misleadingly named method (amend commit to trigger ci - attempt 5) --- swarm/network/simulation/node.go | 4 ++-- swarm/pss/prox_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swarm/network/simulation/node.go b/swarm/network/simulation/node.go index c931bb8825..46c2bb8660 100644 --- a/swarm/network/simulation/node.go +++ b/swarm/network/simulation/node.go @@ -112,7 +112,7 @@ func (s *Simulation) AddNode(opts ...AddNodeOption) (id enode.ID, err error) { // for now we have no way of setting bootnodes or lightnodes in sims // so we just let them be set to false // they should perhaps be possible to override them with AddNodeOption - bzzPrivateKey, err := BzzKeyFromConfig(conf) + bzzPrivateKey, err := BzzPrivateKeyFromConfig(conf) if err != nil { return enode.ID{}, err } @@ -330,7 +330,7 @@ func init() { // derive a private key for swarm for the node key // returns the private key used to generate the bzz key -func BzzKeyFromConfig(conf *adapters.NodeConfig) (*ecdsa.PrivateKey, error) { +func BzzPrivateKeyFromConfig(conf *adapters.NodeConfig) (*ecdsa.PrivateKey, error) { // pad the seed key some arbitrary data as ecdsa.GenerateKey takes 40 bytes seed data privKeyBuf := append(crypto.FromECDSA(conf.PrivateKey), []byte{0x62, 0x7a, 0x7a, 0x62, 0x7a, 0x7a, 0x62, 0x7a}...) bzzPrivateKey, err := ecdsa.GenerateKey(crypto.S256(), bytes.NewReader(privKeyBuf)) diff --git a/swarm/pss/prox_test.go b/swarm/pss/prox_test.go index bbcd1247a4..bc32e612d3 100644 --- a/swarm/pss/prox_test.go +++ b/swarm/pss/prox_test.go @@ -402,7 +402,7 @@ func newProxServices(tstdata *testData, allowRaw bool, handlerContextFuncs map[T // if the translation in the network package changes, that can cause these tests to unpredictably fail // therefore we keep a local copy of the translation here addr := network.NewAddr(ctx.Config.Node()) - bzzPrivateKey, err = simulation.BzzKeyFromConfig(ctx.Config) + bzzPrivateKey, err = simulation.BzzPrivateKeyFromConfig(ctx.Config) if err != nil { return nil, nil, err } @@ -428,7 +428,7 @@ func newProxServices(tstdata *testData, allowRaw bool, handlerContextFuncs map[T privkey, err := w.GetPrivateKey(keys) pssp := NewPssParams().WithPrivateKey(privkey) pssp.AllowRaw = allowRaw - bzzPrivateKey, err := simulation.BzzKeyFromConfig(ctx.Config) + bzzPrivateKey, err := simulation.BzzPrivateKeyFromConfig(ctx.Config) if err != nil { return nil, nil, err }