Stopgap don't print private key in shortlog (#1372)
This commit is contained in:
parent
fd4d319450
commit
e5a76b0047
|
@ -49,7 +49,7 @@ type
|
||||||
Real
|
Real
|
||||||
OpaqueBlob
|
OpaqueBlob
|
||||||
|
|
||||||
BlsValue*[N: static int, T] = object
|
BlsValue*[N: static int, T: blscurve.PublicKey or blscurve.Signature] = object
|
||||||
# TODO This is a temporary type needed until we sort out the
|
# TODO This is a temporary type needed until we sort out the
|
||||||
# issues with invalid BLS values appearing in the SSZ test suites.
|
# issues with invalid BLS values appearing in the SSZ test suites.
|
||||||
case kind*: BlsValueType
|
case kind*: BlsValueType
|
||||||
|
@ -195,6 +195,7 @@ func `$`*(x: BlsValue): string =
|
||||||
"raw: " & x.blob.toHex()
|
"raw: " & x.blob.toHex()
|
||||||
|
|
||||||
func toRaw*(x: ValidatorPrivKey): array[RawPrivKeySize, byte] =
|
func toRaw*(x: ValidatorPrivKey): array[RawPrivKeySize, byte] =
|
||||||
|
# TODO: distinct type - see https://github.com/status-im/nim-blscurve/pull/67
|
||||||
SecretKey(x).exportRaw()
|
SecretKey(x).exportRaw()
|
||||||
|
|
||||||
func toRaw*(x: BlsValue): auto =
|
func toRaw*(x: BlsValue): auto =
|
||||||
|
@ -311,7 +312,7 @@ func shortLog*(x: BlsValue): string =
|
||||||
|
|
||||||
func shortLog*(x: ValidatorPrivKey): string =
|
func shortLog*(x: ValidatorPrivKey): string =
|
||||||
## Logging for raw unwrapped BLS types
|
## Logging for raw unwrapped BLS types
|
||||||
x.toRaw()[0..3].toHex()
|
"<private key>"
|
||||||
|
|
||||||
func shortLog*(x: TrustedSig): string =
|
func shortLog*(x: TrustedSig): string =
|
||||||
x.data[0..3].toHex()
|
x.data[0..3].toHex()
|
||||||
|
|
Loading…
Reference in New Issue