mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: Rename misleadingly named method
(amend commit to trigger ci - attempt 5)
This commit is contained in:
parent
ac569871ad
commit
4d6fdb5e5d
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
// for now we have no way of setting bootnodes or lightnodes in sims
|
||||||
// so we just let them be set to false
|
// so we just let them be set to false
|
||||||
// they should perhaps be possible to override them with AddNodeOption
|
// they should perhaps be possible to override them with AddNodeOption
|
||||||
bzzPrivateKey, err := BzzKeyFromConfig(conf)
|
bzzPrivateKey, err := BzzPrivateKeyFromConfig(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return enode.ID{}, err
|
return enode.ID{}, err
|
||||||
}
|
}
|
||||||
|
|
@ -330,7 +330,7 @@ func init() {
|
||||||
|
|
||||||
// derive a private key for swarm for the node key
|
// derive a private key for swarm for the node key
|
||||||
// returns the private key used to generate the bzz 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
|
// 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}...)
|
privKeyBuf := append(crypto.FromECDSA(conf.PrivateKey), []byte{0x62, 0x7a, 0x7a, 0x62, 0x7a, 0x7a, 0x62, 0x7a}...)
|
||||||
bzzPrivateKey, err := ecdsa.GenerateKey(crypto.S256(), bytes.NewReader(privKeyBuf))
|
bzzPrivateKey, err := ecdsa.GenerateKey(crypto.S256(), bytes.NewReader(privKeyBuf))
|
||||||
|
|
|
||||||
|
|
@ -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
|
// 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
|
// therefore we keep a local copy of the translation here
|
||||||
addr := network.NewAddr(ctx.Config.Node())
|
addr := network.NewAddr(ctx.Config.Node())
|
||||||
bzzPrivateKey, err = simulation.BzzKeyFromConfig(ctx.Config)
|
bzzPrivateKey, err = simulation.BzzPrivateKeyFromConfig(ctx.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
@ -428,7 +428,7 @@ func newProxServices(tstdata *testData, allowRaw bool, handlerContextFuncs map[T
|
||||||
privkey, err := w.GetPrivateKey(keys)
|
privkey, err := w.GetPrivateKey(keys)
|
||||||
pssp := NewPssParams().WithPrivateKey(privkey)
|
pssp := NewPssParams().WithPrivateKey(privkey)
|
||||||
pssp.AllowRaw = allowRaw
|
pssp.AllowRaw = allowRaw
|
||||||
bzzPrivateKey, err := simulation.BzzKeyFromConfig(ctx.Config)
|
bzzPrivateKey, err := simulation.BzzPrivateKeyFromConfig(ctx.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue