File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
cpp/wedpr-protocol/grpc/client Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ bcos::Error::Ptr GrpcClient::broadCast(
7575 std::function<bcos::Error::Ptr(ChannelInfo const & channel)> callback)
7676{
7777 auto result = std::make_shared<bcos::Error>(0 , " " );
78+ int successCount = 0 ;
7879 for (auto const & channel : m_broadcastChannels)
7980 {
8081 try
@@ -91,6 +92,10 @@ bcos::Error::Ptr GrpcClient::broadCast(
9192 result->setErrorCode (error->errorCode ());
9293 result->setErrorMessage (result->errorMessage () + error->errorMessage () + " ; " );
9394 }
95+ else
96+ {
97+ successCount++;
98+ }
9499 }
95100 catch (std::exception const & e)
96101 {
@@ -99,5 +104,10 @@ bcos::Error::Ptr GrpcClient::broadCast(
99104 << LOG_KV (" error" , boost::diagnostic_information (e));
100105 }
101106 }
107+ // at least one success
108+ if (successCount > 0 )
109+ {
110+ return std::make_shared<bcos::Error>(0 , " success" );
111+ }
102112 return result;
103113}
You can’t perform that action at this time.
0 commit comments