Skip to content
Commit 91c02134 authored by kaichao's avatar kaichao Committed by GitHub
Browse files

Set reserved nodes with offchain worker. (#6996)



* add offchain worker api to set reserved nodes.

* new offchain api to get node public key.

* node public key from converter

* refactor set reserved nodes ocw api.

* new ndoe authorization pallet

* remove unnecessary clone and more.

* more

* tests for node authorization pallet

* remove dependency

* fix build

* more tests.

* refactor

* Update primitives/core/src/offchain/testing.rs

Co-authored-by: default avatarTomasz Drwięga <[email protected]>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: default avatarTomasz Drwięga <[email protected]>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: default avatarTomasz Drwięga <[email protected]>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: default avatarTomasz Drwięga <[email protected]>

* format code

* expose NetworkService

* remove NetworkStateInfo in offchain

* replace NodePublicKey with PeerId.

* set max length of peer id.

* clear more

* use BTreeSet for set of peers.

* decode opaque peer id.

* extract NetworkProvider for client offchain.

* use OpaquePeerId in node authorization pallet.

* fix test

* better documentation

* fix test

* doc

* more fix

* Update primitives/core/src/offchain/mod.rs

Co-authored-by: default avatarPierre Krieger <[email protected]>

* Update client/offchain/src/api.rs

Co-authored-by: default avatarPierre Krieger <[email protected]>

* derive serialize and deserialize

Co-authored-by: default avatarTomasz Drwięga <[email protected]>
Co-authored-by: default avatarPierre Krieger <[email protected]>
parent 56ce689b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment