Merge pull request #290 from meshplus/fix/return-getmultisigns-error
fix(api/grpc): return the error for GetMultiSigns
This commit is contained in:
commit
92666dd4a2
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/meshplus/bitxhub-model/pb"
|
"github.com/meshplus/bitxhub-model/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,12 @@ func (cbs *ChainBrokerService) GetMultiSigns(ctx context.Context, req *pb.GetMul
|
||||||
cbs.logger.WithFields(logrus.Fields{
|
cbs.logger.WithFields(logrus.Fields{
|
||||||
"id": req.Content,
|
"id": req.Content,
|
||||||
"err": err.Error(),
|
"err": err.Error(),
|
||||||
}).Warnf("Get sign on current node")
|
}).Errorf("Get sign on current node")
|
||||||
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
result[address] = sign
|
result[address] = sign
|
||||||
}
|
}
|
||||||
|
|
||||||
return &pb.SignResponse{
|
return &pb.SignResponse{
|
||||||
Sign: result,
|
Sign: result,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ func NewSwarms(t *testing.T, peerCnt int) []*Swarm {
|
||||||
Key: &repo.Key{},
|
Key: &repo.Key{},
|
||||||
NetworkConfig: &repo.NetworkConfig{
|
NetworkConfig: &repo.NetworkConfig{
|
||||||
N: uint64(peerCnt),
|
N: uint64(peerCnt),
|
||||||
ID: uint64(i+1),
|
ID: uint64(i + 1),
|
||||||
},
|
},
|
||||||
Certs: &repo.Certs{
|
Certs: &repo.Certs{
|
||||||
NodeCertData: nodeData,
|
NodeCertData: nodeData,
|
||||||
|
|
Loading…
Reference in New Issue