Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Commit 4d6fdb5

Browse files
committed
swarm/network: Rename misleadingly named method
(amend commit to trigger ci - attempt 5)
1 parent ac56987 commit 4d6fdb5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

swarm/network/simulation/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (s *Simulation) AddNode(opts ...AddNodeOption) (id enode.ID, err error) {
112112
// for now we have no way of setting bootnodes or lightnodes in sims
113113
// so we just let them be set to false
114114
// they should perhaps be possible to override them with AddNodeOption
115-
bzzPrivateKey, err := BzzKeyFromConfig(conf)
115+
bzzPrivateKey, err := BzzPrivateKeyFromConfig(conf)
116116
if err != nil {
117117
return enode.ID{}, err
118118
}
@@ -330,7 +330,7 @@ func init() {
330330

331331
// derive a private key for swarm for the node key
332332
// returns the private key used to generate the bzz key
333-
func BzzKeyFromConfig(conf *adapters.NodeConfig) (*ecdsa.PrivateKey, error) {
333+
func BzzPrivateKeyFromConfig(conf *adapters.NodeConfig) (*ecdsa.PrivateKey, error) {
334334
// pad the seed key some arbitrary data as ecdsa.GenerateKey takes 40 bytes seed data
335335
privKeyBuf := append(crypto.FromECDSA(conf.PrivateKey), []byte{0x62, 0x7a, 0x7a, 0x62, 0x7a, 0x7a, 0x62, 0x7a}...)
336336
bzzPrivateKey, err := ecdsa.GenerateKey(crypto.S256(), bytes.NewReader(privKeyBuf))

swarm/pss/prox_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ func newProxServices(tstdata *testData, allowRaw bool, handlerContextFuncs map[T
402402
// if the translation in the network package changes, that can cause these tests to unpredictably fail
403403
// therefore we keep a local copy of the translation here
404404
addr := network.NewAddr(ctx.Config.Node())
405-
bzzPrivateKey, err = simulation.BzzKeyFromConfig(ctx.Config)
405+
bzzPrivateKey, err = simulation.BzzPrivateKeyFromConfig(ctx.Config)
406406
if err != nil {
407407
return nil, nil, err
408408
}
@@ -428,7 +428,7 @@ func newProxServices(tstdata *testData, allowRaw bool, handlerContextFuncs map[T
428428
privkey, err := w.GetPrivateKey(keys)
429429
pssp := NewPssParams().WithPrivateKey(privkey)
430430
pssp.AllowRaw = allowRaw
431-
bzzPrivateKey, err := simulation.BzzKeyFromConfig(ctx.Config)
431+
bzzPrivateKey, err := simulation.BzzPrivateKeyFromConfig(ctx.Config)
432432
if err != nil {
433433
return nil, nil, err
434434
}

0 commit comments

Comments
 (0)