From 29d7561dd11c311663ff361c9bc5f82fa3ab1a38 Mon Sep 17 00:00:00 2001 From: Peter Rabbitson Date: Tue, 8 Jun 2021 00:05:48 +0200 Subject: [PATCH] Fix logging of stringified CIDs double-encoded in hex --- chain/vm/syscalls.go | 2 +- cli/state.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index bb93fce8d..0cbefd1fd 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -267,7 +267,7 @@ func (ss *syscallShim) VerifySeal(info proof5.SealVerifyInfo) error { proof := info.Proof seed := []byte(info.InteractiveRandomness) - log.Debugf("Verif r:%x; d:%x; m:%s; t:%x; s:%x; N:%d; p:%x", info.SealedCID, info.UnsealedCID, miner, ticket, seed, info.SectorID.Number, proof) + log.Debugf("Verif r:%s; d:%s; m:%s; t:%x; s:%x; N:%d; p:%x", info.SealedCID, info.UnsealedCID, miner, ticket, seed, info.SectorID.Number, proof) //func(ctx context.Context, maddr address.Address, ssize abi.SectorSize, commD, commR, ticket, proof, seed []byte, sectorID abi.SectorNumber) ok, err := ss.verifier.VerifySeal(info) diff --git a/cli/state.go b/cli/state.go index 6c3c4b111..a9e74f970 100644 --- a/cli/state.go +++ b/cli/state.go @@ -345,7 +345,7 @@ var StateSectorsCmd = &cli.Command{ } for _, s := range sectors { - fmt.Printf("%d: %x\n", s.SectorNumber, s.SealedCID) + fmt.Printf("%d: %s\n", s.SectorNumber, s.SealedCID) } return nil @@ -385,7 +385,7 @@ var StateActiveSectorsCmd = &cli.Command{ } for _, s := range sectors { - fmt.Printf("%d: %x\n", s.SectorNumber, s.SealedCID) + fmt.Printf("%d: %s\n", s.SectorNumber, s.SealedCID) } return nil