mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/pss: Correct revised bzzkey method call
This commit is contained in:
parent
2d5b3c3c78
commit
d2ad11c940
1 changed files with 4 additions and 2 deletions
|
|
@ -406,10 +406,11 @@ 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, addr.OAddr, err = simulation.BzzKeyFromConfig(ctx.Config)
|
bzzPrivateKey, err = simulation.BzzKeyFromConfig(ctx.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
addr.OAddr = network.PrivateKeyToBzzKey(bzzPrivateKey)
|
||||||
b.Store(simulation.BucketKeyBzzPrivateKey, bzzPrivateKey)
|
b.Store(simulation.BucketKeyBzzPrivateKey, bzzPrivateKey)
|
||||||
hp := network.NewHiveParams()
|
hp := network.NewHiveParams()
|
||||||
hp.Discovery = false
|
hp.Discovery = false
|
||||||
|
|
@ -431,10 +432,11 @@ 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
|
||||||
_, bzzKey, err := simulation.BzzKeyFromConfig(ctx.Config)
|
bzzPrivateKey, err := simulation.BzzKeyFromConfig(ctx.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
bzzKey := network.PrivateKeyToBzzKey(bzzPrivateKey)
|
||||||
pskad := kademlia(ctx.Config.ID, bzzKey)
|
pskad := kademlia(ctx.Config.ID, bzzKey)
|
||||||
ps, err := NewPss(pskad, pssp)
|
ps, err := NewPss(pskad, pssp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue