mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm/swarm-smoke-pss: make error logs consistent
This commit is contained in:
parent
e03a8a75dd
commit
550c60e410
1 changed files with 6 additions and 5 deletions
|
|
@ -130,7 +130,7 @@ func pssSetup() *pssSession {
|
||||||
|
|
||||||
rpcClient, err := rpc.Dial(wsHost)
|
rpcClient, err := rpc.Dial(wsHost)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error dialing host", "err", err)
|
log.Error("error dialing host", "err", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ func pssSetup() *pssSession {
|
||||||
var addr hexutil.Bytes
|
var addr hexutil.Bytes
|
||||||
err = rpcClient.Call(&addr, "pss_baseAddr")
|
err = rpcClient.Call(&addr, "pss_baseAddr")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error calling host for addr", "err", err)
|
log.Error("error calling host for addr", "err", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ func pssSetup() *pssSession {
|
||||||
var pubkey string
|
var pubkey string
|
||||||
err = rpcClient.Call(&pubkey, "pss_getPublicKey")
|
err = rpcClient.Call(&pubkey, "pss_getPublicKey")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error calling host for pubkey", "err", err)
|
log.Error("error calling host for pubkey", "err", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ func pssSetup() *pssSession {
|
||||||
defer cancel()
|
defer cancel()
|
||||||
sub, err := rpcClient.Subscribe(ctx, "pss", session.msgC, "receive", session.topic, true, false)
|
sub, err := rpcClient.Subscribe(ctx, "pss", session.msgC, "receive", session.topic, true, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error calling host for subscribe", "err", err)
|
log.Error("error calling host for subscribe", "err", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
session.nodes = append(session.nodes,
|
session.nodes = append(session.nodes,
|
||||||
|
|
@ -242,7 +242,7 @@ func pssSymDo(ctx *cli.Context, session *pssSession, tuid string) error {
|
||||||
var senderSymKeyID string
|
var senderSymKeyID string
|
||||||
err = j.sender.client.Call(&senderSymKeyID, "pss_setSymmetricKey", symkey, session.topic, hexutil.Encode(j.receiver.addr), true)
|
err = j.sender.client.Call(&senderSymKeyID, "pss_setSymmetricKey", symkey, session.topic, hexutil.Encode(j.receiver.addr), true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("erro setting sym key on the sender", "err", err)
|
log.Error("error setting sym key on the sender", "err", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -268,6 +268,7 @@ func pssAsymDo(ctx *cli.Context, session *pssSession, tuid string) error {
|
||||||
|
|
||||||
err := j.sender.client.Call(nil, "pss_sendAsym", j.receiver.pubkey, session.topic, hexutil.Encode(j.msg))
|
err := j.sender.client.Call(nil, "pss_sendAsym", j.receiver.pubkey, session.topic, hexutil.Encode(j.msg))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Error("error sending message using asym encryption", "err", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue