-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change send action #1544
Change send action #1544
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1544 +/- ##
==========================================
- Coverage 55.05% 55.02% -0.03%
==========================================
Files 149 149
Lines 13155 13157 +2
==========================================
- Hits 7242 7240 -2
- Misses 4978 4980 +2
- Partials 935 937 +2
Continue to review full report at Codecov.
|
@@ -302,22 +298,24 @@ func (api *Server) GetServerMeta(ctx context.Context, | |||
} | |||
|
|||
// SendAction is the API to send an action to blockchain. | |||
func (api *Server) SendAction(ctx context.Context, in *iotexapi.SendActionRequest) (res *iotexapi.SendActionResponse, err error) { | |||
func (api *Server) SendAction(ctx context.Context, in *iotexapi.SendActionRequest) (*iotexapi.SendActionResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is 122 characters (from lll
)
var selp action.SealedEnvelope | ||
var err error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declarations should never be cuddled (from wsl
)
works on #1533
I measured time consumed difference in SendAction between this change. And it turned out to be not a huge overhead even though not using dispatcher, it handles action synchronously. (2 or 3 times but microsecond unit) By this change user can directly know whether it fails to put their action into actpool or not.