Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.

Commit 84c5d9b

Browse files
authored
Fix Bugs (#144)
* update: types * update: slash immediately in node template * fix: CAP * fix: #143 * update: structure * update: use `usable_balance` * remove: unused features * add: init-supply feature * fix: typo * update: support init-supply * update: `account_id` to `module_id` * add: migration code * fix: tests * fix: bugs * revert: `account_id` to `module_id` * remove: init-supply feature * update: bump version * update: deps
1 parent b0525af commit 84c5d9b

File tree

29 files changed

+577
-471
lines changed

29 files changed

+577
-471
lines changed

Cargo.lock

Lines changed: 395 additions & 372 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/node-template/node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "node-template"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Anonymous"]
55
description = "Darwinia Node template"
66
edition = "2018"

bin/node-template/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "node-template-runtime"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Anonymous"]
55
edition = "2018"
66
license = "Unlicense"

bin/node-template/runtime/darwinia_types.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
"r": "Balance",
9393
"k": "Balance"
9494
},
95+
"SpanRecord": {
96+
"slashed": "RKT",
97+
"paid_out": "RKT"
98+
},
9599
"__[pallet.bridge.eth]__": {},
96100
"EthTransactionIndex": "(H256, u64)",
97101
"EthHeaderBrief": {

bin/node-template/runtime/polkadot_compatible_types.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
"r": "Balance",
103103
"k": "Balance"
104104
},
105+
"SpanRecord": {
106+
"slashed": "RKT",
107+
"paid_out": "RKT"
108+
},
105109
"__[pallet.bridge.eth]__": {},
106110
"EthTransactionIndex": "(H256, u64)",
107111
"EthHeaderBrief": {

bin/node-template/runtime/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ pub const EPOCH_DURATION_IN_SLOTS: u64 = {
337337
pub const SESSION_DURATION: BlockNumber = EPOCH_DURATION_IN_SLOTS as _;
338338
pub const SESSIONS_PER_ERA: SessionIndex = 3;
339339

340-
pub const CAP: Balance = 1_000_000_000 * COIN;
340+
pub const CAP: Balance = 10_000_000_000 * COIN;
341341
pub const TOTAL_POWER: Power = 1_000_000_000;
342342

343343
/// The version information used to identify this runtime when compiled natively.
@@ -539,7 +539,7 @@ parameter_types! {
539539
pub const SessionsPerEra: SessionIndex = SESSIONS_PER_ERA;
540540
pub const BondingDurationInEra: darwinia_staking::EraIndex = 14 * 24 * (HOURS / (SESSIONS_PER_ERA * BLOCKS_PER_SESSION));
541541
pub const BondingDurationInBlockNumber: BlockNumber = 14 * DAYS;
542-
pub const SlashDeferDuration: darwinia_staking::EraIndex = 7 * 24; // 1/4 the bonding duration.
542+
pub const SlashDeferDuration: darwinia_staking::EraIndex = 0;
543543
pub const ElectionLookahead: BlockNumber = BLOCKS_PER_SESSION / 4;
544544
pub const MaxIterations: u32 = 5;
545545
pub const MaxNominatorRewardedPerValidator: u32 = 64;
@@ -644,10 +644,12 @@ impl darwinia_treasury::Trait for Runtime {
644644
}
645645

646646
parameter_types! {
647+
pub const ClaimsModuleId: ModuleId = ModuleId(*b"da/claim");
647648
pub const Prefix: &'static [u8] = b"Pay RINGs to the template account:";
648649
}
649650
impl darwinia_claims::Trait for Runtime {
650651
type Event = Event;
652+
type ModuleId = ClaimsModuleId;
651653
type Prefix = Prefix;
652654
type RingCurrency = Ring;
653655
}

frame/balances/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "darwinia-balances"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Darwinia Network <[email protected]>"]
55
description = "FRAME pallet to manage RING"
66
edition = "2018"

frame/balances/rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "darwinia-balances-rpc"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Darwinia Network <[email protected]>"]
55
description = "Node-specific RPC methods for interaction with balances."
66
edition = "2018"

frame/balances/rpc/runtime-api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "darwinia-balances-rpc-runtime-api"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Darwinia Network <[email protected]>"]
55
description = "Runtime API definition required by balances RPC extensions."
66
edition = "2018"

frame/bridge/eth/backing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "darwinia-eth-backing"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
authors = ["Darwinia Network <[email protected]>"]
55
description = "FRAME pallet to backing Ethereum assets"
66
edition = "2018"

0 commit comments

Comments
 (0)