mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 21:19:24 +00:00
Expand validator sets API with the rest of the events and some getters
We could've added a storage API, and fetched fields that way, except we want the storage to be opaque. That meant we needed to add the RPC routes to the node, which also simplifies other people writing RPC code and fetching these fields. Then the node could've used the storage API, except a lot of the storage in validator-sets is marked opaque and to only be read via functions, so extending the runtime made the most sense.
This commit is contained in:
@@ -16,7 +16,9 @@ use jsonrpsee::RpcModule;
|
||||
use sc_client_api::BlockBackend;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
|
||||
mod utils;
|
||||
mod blockchain;
|
||||
mod validator_sets;
|
||||
mod p2p_validators;
|
||||
|
||||
pub struct FullDeps<C, P> {
|
||||
@@ -42,6 +44,7 @@ pub fn create_full<
|
||||
|
||||
let mut root = RpcModule::new(());
|
||||
root.merge(blockchain::module(client.clone())?)?;
|
||||
root.merge(validator_sets::module(client.clone()))?;
|
||||
if let Some(authority_discovery) = authority_discovery {
|
||||
root.merge(p2p_validators::module(id, client, authority_discovery)?)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user