Skip to content

Commit

Permalink
Return result on broadcast with error
Browse files Browse the repository at this point in the history
  • Loading branch information
fbsobreira committed Sep 10, 2020
1 parent 0f55063 commit 5dae825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/client/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func (g *GrpcClient) Broadcast(tx *core.Transaction) (*api.Return, error) {
return nil, err
}
if !result.GetResult() {
return nil, fmt.Errorf("result error: %s", result.GetMessage())
return result, fmt.Errorf("result error: %s", result.GetMessage())
}
if result.GetCode() != api.Return_SUCCESS {
return nil, fmt.Errorf("result error(%s): %s", result.GetCode(), result.GetMessage())
return result, fmt.Errorf("result error(%s): %s", result.GetCode(), result.GetMessage())
}
return result, nil
}
Expand Down

0 comments on commit 5dae825

Please sign in to comment.