Author | SHA1 | Message | Date |
---|---|---|---|
Kene |
49153b753c
|
rpc: paginate mempool /unconfirmed_txs endpoint (#7612)
This commit changes the behaviour of the /unconfirmed_txs endpoint by replacing limit with a page and perPage parameter for pagination. The test case for unconfirmed_txs have been accommodated to properly test this change and the documentation for the API as well. |
3 years ago |
M. J. Fromberger |
dbe2146d0a
|
rpc: simplify the encoding of interface-typed arguments in JSON (#7600)
Add package jsontypes that implements a subset of the custom libs/json package. Specifically it handles encoding and decoding of interface types wrapped in "tagged" JSON objects. It omits the deep reflection on arbitrary types, preserving only the handling of type tags wrapper encoding. - Register interface types (Evidence, PubKey, PrivKey) for tagged encoding. - Update the existing implementations to satisfy the type. - Register those types with the jsontypes registry. - Add string tags to 64-bit integer fields where needed. - Add marshalers to structs that export interface-typed fields. |
3 years ago |
M. J. Fromberger |
7f8b75e1ee
|
rpc: replace anonymous arguments with structured types (#7552)
Instead of using anonymous maps, define tagged struct types for JSON argument encoding. This allows us to have the encoding rules we want without tmjson. This commit handles the "easy" cases. BroadcastEvidence is omitted here, because it depends on the interface encoding rules from tmjson. I will address that in a forthcoming change. |
3 years ago |