mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
cmd/swarm: do not print bzz on --compressed
This commit is contained in:
parent
c1cd442fc3
commit
85f4cba90e
1 changed files with 3 additions and 2 deletions
|
|
@ -231,13 +231,14 @@ func keys(ctx *cli.Context) error {
|
||||||
pubkey := crypto.FromECDSAPub(&privateKey.PublicKey)
|
pubkey := crypto.FromECDSAPub(&privateKey.PublicKey)
|
||||||
pubkeyhex := hex.EncodeToString(pubkey)
|
pubkeyhex := hex.EncodeToString(pubkey)
|
||||||
pubCompressed := hex.EncodeToString(crypto.CompressPubkey(&privateKey.PublicKey))
|
pubCompressed := hex.EncodeToString(crypto.CompressPubkey(&privateKey.PublicKey))
|
||||||
|
bzzkey := crypto.Keccak256Hash(pubkey).Hex()
|
||||||
|
|
||||||
if !ctx.Bool(SwarmCompressedFlag.Name) {
|
if !ctx.Bool(SwarmCompressedFlag.Name) {
|
||||||
|
fmt.Println(fmt.Sprintf("bzzkey=%s", bzzkey[2:]))
|
||||||
fmt.Println(fmt.Sprintf("publicKey=%s", pubkeyhex))
|
fmt.Println(fmt.Sprintf("publicKey=%s", pubkeyhex))
|
||||||
}
|
}
|
||||||
fmt.Println(fmt.Sprintf("publicKeyCompressed=%s", pubCompressed))
|
fmt.Println(fmt.Sprintf("publicKeyCompressed=%s", pubCompressed))
|
||||||
|
|
||||||
bzzkey := crypto.Keccak256Hash(pubkey).Hex()
|
|
||||||
fmt.Println(fmt.Sprintf("bzzkey=%s", bzzkey[2:]))
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue