Add verification nonce to non-verify status, if it exists, and name it verification nonce in the verify status for clarity

This commit is contained in:
Jeff Mitchell 2018-05-29 13:18:52 -04:00
parent c53717ba1c
commit 2971813684
1 changed files with 4 additions and 1 deletions

View File

@ -690,6 +690,9 @@ func (c *OperatorRekeyCommand) printStatus(in interface{}) int {
out = append(out, fmt.Sprintf("New Shares | %d", status.N))
out = append(out, fmt.Sprintf("New Threshold | %d", status.T))
out = append(out, fmt.Sprintf("Verification Required | %t", status.VerificationRequired))
if status.VerificationNonce != "" {
out = append(out, fmt.Sprintf("Verification Nonce | %s", status.VerificationNonce))
}
}
if len(status.PGPFingerprints) > 0 {
out = append(out, fmt.Sprintf("PGP Fingerprints | %s", status.PGPFingerprints))
@ -697,10 +700,10 @@ func (c *OperatorRekeyCommand) printStatus(in interface{}) int {
}
case *api.RekeyVerificationStatusResponse:
status := in.(*api.RekeyVerificationStatusResponse)
out = append(out, fmt.Sprintf("Nonce | %s", status.Nonce))
out = append(out, fmt.Sprintf("Started | %t", status.Started))
out = append(out, fmt.Sprintf("New Shares | %d", status.N))
out = append(out, fmt.Sprintf("New Threshold | %d", status.T))
out = append(out, fmt.Sprintf("Verification Nonce | %s", status.Nonce))
out = append(out, fmt.Sprintf("Verification Progress | %d/%d", status.Progress, status.T))
default:
c.UI.Error("Unknown status type")