Skip to content

Commit

Permalink
fix: add bifrost_polkadot controller config (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqwangningbo committed Aug 19, 2022
1 parent d12b2f7 commit 2fdbe31
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/chains-config/bifrostPolkadotControllers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Substrate API Sidecar.
//
// Substrate API Sidecar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import { ControllerConfig } from '../types/chains-config';
import { initLRUCache } from './cache/lruCache';

/**
* Controllers for Bifrost collator
*/
export const bifrostPolkadotControllers: ControllerConfig = {
controllers: [
'AccountsBalanceInfo',
'AccountsValidate',
'Blocks',
'BlocksExtrinsics',
'NodeNetwork',
'NodeTransactionPool',
'NodeVersion',
'PalletsStorage',
'Paras',
'RuntimeCode',
'RuntimeMetadata',
'RuntimeSpec',
'TransactionDryRun',
'TransactionFeeEstimate',
'TransactionMaterial',
'TransactionSubmit',
],
options: {
finalizes: true,
minCalcFeeRuntime: 1,
blockStore: initLRUCache(),
},
};
2 changes: 2 additions & 0 deletions src/chains-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { ControllerConfig } from '../types/chains-config';
import { acalaControllers } from './acalaControllers';
import { astarControllers } from './astarControllers';
import { bifrostControllers } from './bifrostControllers';
import { bifrostPolkadotControllers } from './bifrostPolkadotControllers';
import { calamariControllers } from './calamariControllers';
import { crustControllers } from './crustControllers';
import { defaultControllers } from './defaultControllers';
Expand Down Expand Up @@ -69,6 +70,7 @@ const specToControllerMap: { [x: string]: ControllerConfig } = {
manta: mantaControllers,
crust: crustControllers,
bifrost: bifrostControllers,
bifrost_polkadot: bifrostPolkadotControllers,
heiko: heikoControllers,
parallel: parallelControllers,
};
Expand Down

0 comments on commit 2fdbe31

Please sign in to comment.