rpc v2: `submitAndWatch` replace old messages if it's lagging (#4901)
Close https://github.com/paritytech/polkadot-sdk/issues/3076 The fix is really just that older messages are replaced if the client can't keep up with the server instead. Because I wanted the same functionality as `pipe_from_stream` for both pending/subscription I added two wrapper types on-top of the types from jsonrpsee to make it nicer. I added a trait `Buffer` so I could still use pipe_from_stream but that abstraction is a little leaky but only to avoid adding an identical method/function with another strategy...
parent
0636ffdc
Showing
- substrate/client/consensus/beefy/rpc/src/lib.rs 8 additions, 2 deletionssubstrate/client/consensus/beefy/rpc/src/lib.rs
- substrate/client/consensus/grandpa/rpc/src/lib.rs 8 additions, 2 deletionssubstrate/client/consensus/grandpa/rpc/src/lib.rs
- substrate/client/rpc-spec-v2/src/chain_head/chain_head.rs 5 additions, 6 deletionssubstrate/client/rpc-spec-v2/src/chain_head/chain_head.rs
- substrate/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs 8 additions, 14 deletions...te/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs
- substrate/client/rpc-spec-v2/src/transaction/tests/transaction_tests.rs 87 additions, 1 deletion...nt/rpc-spec-v2/src/transaction/tests/transaction_tests.rs
- substrate/client/rpc-spec-v2/src/transaction/transaction.rs 16 additions, 11 deletionssubstrate/client/rpc-spec-v2/src/transaction/transaction.rs
- substrate/client/rpc/src/author/mod.rs 4 additions, 2 deletionssubstrate/client/rpc/src/author/mod.rs
- substrate/client/rpc/src/chain/chain_full.rs 5 additions, 3 deletionssubstrate/client/rpc/src/chain/chain_full.rs
- substrate/client/rpc/src/state/state_full.rs 9 additions, 3 deletionssubstrate/client/rpc/src/state/state_full.rs
- substrate/client/rpc/src/utils.rs 237 additions, 112 deletionssubstrate/client/rpc/src/utils.rs
Please register or sign in to comment