rpc-v2/transaction: Generate `Invalid` events and add tests (#3784)
This PR ensures that the transaction API generates an `Invalid` events
for transaction bytes that fail to decode.
The spec mentioned the `Invalid` event at the jsonrpc error section,
however this spec PR makes things clearer:
- https://github.com/paritytech/json-rpc-interface-spec/pull/146
While at it have discovered an inconsistency with the generated events.
The drop event from the transaction pool was incorrectly mapped to the
`invalid` event.
Added tests for the API stabilize the API soon:
- https://github.com/paritytech/json-rpc-interface-spec/pull/144
Closes: https://github.com/paritytech/polkadot-sdk/issues/3083
cc @paritytech/subxt-team
---------
Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
parent
a26d25d5
Showing
- substrate/client/rpc-spec-v2/src/chain_head/test_utils.rs 19 additions, 3 deletionssubstrate/client/rpc-spec-v2/src/chain_head/test_utils.rs
- substrate/client/rpc-spec-v2/src/transaction/tests/mod.rs 1 addition, 0 deletionssubstrate/client/rpc-spec-v2/src/transaction/tests/mod.rs
- substrate/client/rpc-spec-v2/src/transaction/tests/setup.rs 37 additions, 2 deletionssubstrate/client/rpc-spec-v2/src/transaction/tests/setup.rs
- substrate/client/rpc-spec-v2/src/transaction/tests/transaction_tests.rs 151 additions, 0 deletions...nt/rpc-spec-v2/src/transaction/tests/transaction_tests.rs
- substrate/client/rpc-spec-v2/src/transaction/transaction.rs 16 additions, 17 deletionssubstrate/client/rpc-spec-v2/src/transaction/transaction.rs
Please register or sign in to comment