Commit graph

17 commits

Author SHA1 Message Date
Daniel Liu
eb770486f2
internal: remove unused shh and swarm modules from console #32073 (#1407)
Similar to https://github.com/ethereum/go-ethereum/pull/31856, remove
the not availabe shh, swarm modules in the console.

---------

Co-authored-by: Zhou <DanialZhouMAX@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-09-03 15:40:28 +08:00
Daniel Liu
f19813e3ee
rpc: run tests in parallel #30384 (#1021)
Continuation of https://github.com/ethereum/go-ethereum/pull/30381

Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
2025-05-06 09:41:42 +08:00
lightclient
9373c71211 rpc: use stable object in notifier test #30193
This makes the test resilient to changes of types.Header -- otherwise the test needs to be
updated each time the header structure is modified.
2025-04-29 17:04:50 +08:00
Delweng
7bf5517cda rpc: improve performance of subscription notification encoding #28328
It turns out that encoding json.RawMessage is slow because
package json basically parses the message again to ensure it is valid.
We can avoid the slowdown by encoding the entire RPC notification once,
which yields a 30% speedup.
2025-04-29 17:04:50 +08:00
Daniel Liu
1d6b09394b
rpc: check that version is 2.0 in request objects #25570 (#973)
The JSON-RPC spec requires the "version" field to be exactly "2.0",
so we should verify that. This change is not backwards-compatible with
sloppy client implementations, but I decided to go ahead with it anyway
because the failure will be caught via the returned error.

Co-authored-by: Seungbae Yu <dbadoy4874@gmail.com>
2025-04-24 19:02:33 +08:00
Daniel Liu
175ef934ed
rpc: remove mention of shh RPC API #25137 (#968) 2025-04-24 18:41:11 +08:00
Daniel Liu
1f430bcbb1
console: handle eth.coinbase throws #19374 (#953)
* rpc: implement full bi-directional communication #18471

* console: handle eth.coinbase throws #19374

* rpc: remove extra debug log message

* rpc: add go:build lines #23468
2025-04-24 18:11:48 +08:00
Banana-J
39f6e6ee56
upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
Felix Lange
4e474c74dc
rpc: fix subscription corner case and speed up tests (#17874)
Notifier tracks whether subscription are 'active'. A subscription
becomes active when the subscription ID has been sent to the client. If
the client sends notifications in the request handler before the
subscription becomes active they are dropped. The tests tried to work
around this problem by always waiting 5s before sending the first
notification.

Fix it by buffering notifications until the subscription becomes active.
This speeds up all subscription tests.

Also fix TestSubscriptionMultipleNamespaces to wait for three messages
per subscription instead of six. The test now finishes just after all
notifications have been received and doesn't hit the 30s timeout anymore.
2018-10-09 16:34:24 +02:00
ferhat elmas
9619a61024 all: gofmt -w -s (#15419) 2017-11-08 11:45:52 +01:00
Egon Elbre
e063d538b8 rpc: fix megacheck warnings 2017-08-08 11:08:37 +02:00
Bas van Kervel
37e3f561f1
rpc: support subscriptions under custom namespaces 2017-04-25 11:13:22 +02:00
Felix Lange
c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Felix Lange
b9b3efb09f all: fix ineffectual assignments and remove uses of crypto.Sha3
go get github.com/gordonklaus/ineffassign
ineffassign .
2017-01-09 16:24:42 +01:00
Péter Szilágyi
18c77744ff
all: fix spelling errors 2017-01-06 19:44:35 +02:00
Bas van Kervel
47ff813012 rpc: refactor subscriptions and filters 2016-08-17 12:59:58 +02:00
Renamed from rpc/notification_test.go (Browse further)