Skip to content

Commit

Permalink
feat(dot/rpc) implement author_hasSessionKeys RPC call (#1715)
Browse files Browse the repository at this point in the history
* chore: add interface for grandpa in rpc pkg

* chore: create roundState rpc call

* chore: coment unused branch

* chore: fix lint

* chore: add test case

* chore: fix lint

* chore: add grandpa subscribe justification rpc call

* chore: add cancel function to stop goroutine when unsuubscribe

* chore: resolve lint

* chore: add tests to subscribe justification call

* remove deps from round state rpc call pr

* chore: remove unecessary changes

* remove inpackage well mock is in mocks folder

* chore: fix lint

* wip: fixing tests

* chore: use channels to control goroutines

* chore: resolve lint

* add time.Duration on structs

* chore: add runtime method and rpc method

* wip: fix runtime response scale decoding

* chore: adding data to tests

* wip: improve test coverage and assertions

* chore: hasSessionKey rpc call done

* chore: change config.toml back

* chore: remove log, add string.EqualFold

* chore: remove unused logs, get back new private key

* update hasSessionKey method to use coreapi insted of runtime api

* chore: resolve lint issues

* chore: change from []byte to []uint8

* chore: fix tests failures

* chore: fix HasSessionKeyResponse comments

Co-authored-by: noot <36753753+noot@users.noreply.github.com>

* chore: fix KeyTypeID comments

Co-authored-by: noot <36753753+noot@users.noreply.github.com>

* chore: update comments, unexport struct and remove qtyCheck

* chore: improve hasSessionKey key check

* chore: update params to represent better data

* chore: improve func name to DecodeKeyPairFromHex

* chore: get back func names to avoid naming conflicts

* chore: update go.sum

* chore: update grandpa_subscribeJustification return response

* chore: fix lint issues

* chore: check the len of the slice of decoded keys

* chore: update exports comments

* chore: update the import style

* chore: improve DecodeKeyPairFromHex export comment

* chore: hasSessionKeys test fixed

* chore: improve export function comment

* chore: group rpc methods string in a unique place

* chore: use chan struct{}

* chore: fix tests that uses wsconn

* chore: fix subscription test

* chore: improve log message

* chore: fix lint issues

* chore: increase the author RPC method qty

* chore: fix deepsource style error

* chore: keep just related changes

* chore: improve test coverage

* chore: improve test coverage on lib/keystore/helpers.go

* chore: improve testing and remove unused function

* chore: create more test cases to hasSessionKey RPC method

Co-authored-by: Arijit Das <arijitad.in@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 6, 2021
1 parent 67c93f4 commit c47a217
Show file tree
Hide file tree
Showing 23 changed files with 1,274 additions and 36 deletions.
2 changes: 1 addition & 1 deletion dot/core/mocks/block_producer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c47a217

Please sign in to comment.