mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
TendermintApi, compilation fixes
This commit is contained in:
@@ -29,6 +29,8 @@ sp-block-builder = { git = "https://github.com/serai-dex/substrate", default-fea
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
|
||||
sp-tendermint = { path = "../tendermint/primitives", default-features = false }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-executive = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
@@ -43,7 +45,7 @@ pallet-contracts-primitives = { git = "https://github.com/serai-dex/substrate",
|
||||
pallet-contracts = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
|
||||
pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-tendermint = { path = "../pallet-tendermint", default-features = false }
|
||||
pallet-tendermint = { path = "../tendermint/pallet", default-features = false }
|
||||
|
||||
frame-system-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
@@ -68,6 +70,8 @@ std = [
|
||||
"sp-runtime/std",
|
||||
"sp-api/std",
|
||||
|
||||
"sp-tendermint/std",
|
||||
|
||||
"frame-system/std",
|
||||
"frame-support/std",
|
||||
"frame-executive/std",
|
||||
|
||||
@@ -361,6 +361,16 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_tendermint::TendermintApi<Block> for Runtime {
|
||||
fn current_session() -> u32 {
|
||||
Tendermint::session()
|
||||
}
|
||||
|
||||
fn validators() -> Vec<Public> {
|
||||
Session::validators()
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
System::account_nonce(account)
|
||||
|
||||
Reference in New Issue
Block a user