mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
Rework RPC server start process #1265
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1265
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AnnaShaleva on GitHub (Feb 21, 2024).
Is your feature request related to a problem? Please describe.
After #3307 the only node service that requires from caller to send call to
Startto a separate goroutine is RPC server. It's so special because it may return errors to the provided error channel, and the caller must start error channel by the moment of RPC server start:nspcc-dev/neo-go@327e766cd9/cli/server/server.go (L503-L506)One day it may cause a bug, because we always need to remember about this RPC server behaviour.
Describe the solution you'd like
Refactor RPC server start so that the caller is able to call
Startin the same goroutine. Send code that may return errors to a separate goroutine insideStart.Describe alternatives you've considered
Allow to return error from
Start, but it'd be inconvenient since we have commonServiceinterface and none of our services return error from start.