From 6f4461db7e82e073ffd96a3d7534071387ecab64 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 5 Sep 2024 01:48:17 +0800 Subject: [PATCH] refactor: handle zero bitmap (#332) --- chainio/clients/avsregistry/reader.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/chainio/clients/avsregistry/reader.go b/chainio/clients/avsregistry/reader.go index 54331cc2..f508e137 100644 --- a/chainio/clients/avsregistry/reader.go +++ b/chainio/clients/avsregistry/reader.go @@ -361,17 +361,26 @@ func (r *ChainReader) QueryRegistrationDetail( ) ([]bool, error) { operatorId, err := r.GetOperatorId(opts, operatorAddress) if err != nil { - return nil, err + return nil, utils.WrapError("Failed to get operator id", err) } value, err := r.registryCoordinator.GetCurrentQuorumBitmap(opts, operatorId) if err != nil { - return nil, err + return nil, utils.WrapError("Failed to get operator quorums", err) } numBits := value.BitLen() var quorums []bool for i := 0; i < numBits; i++ { quorums = append(quorums, value.Int64()&(1<