Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Turn storage items into parameters #2883

Merged
merged 32 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
06820d0
balances: Turn storage items into parameters.
dvc94ch Jun 17, 2019
ff77349
contract: Turn storage items into parameters.
dvc94ch Jun 17, 2019
02c1de2
council: Turn storage items into parameters.
dvc94ch Jun 17, 2019
4337cf0
finality-tracker: Turn storage items into parameters.
dvc94ch Jun 17, 2019
da67b8a
treasury: Turn storage items into parameters.
dvc94ch Jun 17, 2019
8eeab30
democracy: Fix tests.
dvc94ch Jun 17, 2019
1f6baf9
example: Fix tests.
dvc94ch Jun 17, 2019
71abb20
executive: Fix tests.
dvc94ch Jun 17, 2019
b9e663c
staking: Fix tests.
dvc94ch Jun 17, 2019
f46c96c
Update runtime.
dvc94ch Jun 17, 2019
a1776cb
Update template-node.
dvc94ch Jun 17, 2019
bef6e6c
Update runtime version.
dvc94ch Jun 24, 2019
39812ac
Fix executor tests.
dvc94ch Jun 17, 2019
21ef5bc
Fix node cli tests.
dvc94ch Jun 19, 2019
ecd7214
Address grumbles.
dvc94ch Jun 24, 2019
f4dd6ef
Add removed default values to docs.
dvc94ch Jun 24, 2019
13467f2
Set associated consts must be callable outside of build.
dvc94ch Jun 24, 2019
01d1e40
Make gas price a storage item.
dvc94ch Jun 24, 2019
655a0c0
Fix not enough gas to pay for transfer fee.
dvc94ch Jun 25, 2019
901dffe
Merge remote-tracking branch 'upstream/master' into dvc-const-params
dvc94ch Jun 26, 2019
2c1b6cb
Merge remote-tracking branch 'upstream/master' into dvc-const-params
dvc94ch Jun 28, 2019
827aa40
Merge remote-tracking branch 'upstream/master' into dvc-const-params
dvc94ch Jul 1, 2019
a2a1372
Fix build.
dvc94ch Jul 1, 2019
fae76e1
Emit metadata.
dvc94ch Jul 1, 2019
a6307e3
Fix build.
dvc94ch Jul 1, 2019
901bad8
Merge remote-tracking branch 'upstream/master' into dvc-const-params
dvc94ch Jul 1, 2019
7edbfcc
Add default values for all parameter types.
dvc94ch Jul 2, 2019
b0dee49
Fix build.
dvc94ch Jul 2, 2019
e974c2c
Merge remote-tracking branch 'upstream/master' into dvc-const-params
dvc94ch Jul 2, 2019
bb96db7
Fix build.
dvc94ch Jul 2, 2019
c578f59
Fix build.
dvc94ch Jul 2, 2019
b9908a7
Fix build.
dvc94ch Jul 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set associated consts must be callable outside of build.
  • Loading branch information
dvc94ch committed Jun 26, 2019
commit 13467f2fbd442ecf088770b34e9a969af0c623a7
6 changes: 4 additions & 2 deletions srml/balances/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ impl ExtBuilder {
self.vesting = vesting;
self
}
pub fn build(self) -> runtime_io::TestExternalities<Blake2Hasher> {
pub fn set_associated_consts(&self) {
EXISTENTIAL_DEPOSIT.with(|v| *v.borrow_mut() = self.existential_deposit);
dvc94ch marked this conversation as resolved.
Show resolved Hide resolved
TRANSFER_FEE.with(|v| *v.borrow_mut() = self.transfer_fee);
CREATION_FEE.with(|v| *v.borrow_mut() = self.creation_fee);
TRANSACTION_BASE_FEE.with(|v| *v.borrow_mut() = self.transaction_base_fee);
TRANSACTION_BYTE_FEE.with(|v| *v.borrow_mut() = self.transaction_byte_fee);

}
pub fn build(self) -> runtime_io::TestExternalities<Blake2Hasher> {
self.set_associated_consts();
let mut t = system::GenesisConfig::<Runtime>::default().build_storage().unwrap().0;
t.extend(GenesisConfig::<Runtime> {
balances: if self.monied {
Expand Down
6 changes: 4 additions & 2 deletions srml/contracts/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,15 @@ impl ExtBuilder {
self.creation_fee = creation_fee;
self
}
pub fn build(self) -> runtime_io::TestExternalities<Blake2Hasher> {
pub fn set_associated_consts(&self) {
EXISTENTIAL_DEPOSIT.with(|v| *v.borrow_mut() = self.existential_deposit);
TRANSFER_FEE.with(|v| *v.borrow_mut() = self.transfer_fee);
CREATION_FEE.with(|v| *v.borrow_mut() = self.creation_fee);
GAS_PRICE.with(|v| *v.borrow_mut() = self.gas_price);
BLOCK_GAS_LIMIT.with(|v| *v.borrow_mut() = self.block_gas_limit);

}
pub fn build(self) -> runtime_io::TestExternalities<Blake2Hasher> {
self.set_associated_consts();
let mut t = system::GenesisConfig::<Test>::default()
.build_storage()
.unwrap()
Expand Down