Better Parameterisation for Fee system (#3823)

* Better fee parameters

* Fix build

* Better runtime tests

* Price to Weight ratio as type parameter (#3856)

* Price to Weight ration as type parameter

* Kian feedback

* Some renames.

* Fix executor tests

* Getting Closer.

* Phantom Data

* Actually fix executor tests.

* Fix tests.

* Remove todo

* Fix build
This commit is contained in:
Kian Paimani
2019-10-24 15:03:52 +02:00
committed by Gavin Wood
parent 022126f906
commit ecd1ed7b65
10 changed files with 214 additions and 186 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ use rstd::{cmp::Ordering, ops, prelude::*, cell::RefCell, convert::TryFrom};
// A sensible value for this would be half of the dword size of the host machine. Since the
// runtime is compiled to 32bit webassembly, using 32 and 64 for single and double respectively
// should yield the most performance. TODO #3745 we could benchmark this and verify.
// should yield the most performance.
/// Representation of a single limb.
pub type Single = u32;
/// Representation of two limbs.
@@ -48,6 +48,12 @@ impl Fixed64 {
DIV
}
/// Consume self and return the inner value.
///
/// This should only be used for testing.
#[cfg(any(feature = "std", test))]
pub fn into_inner(self) -> i64 { self.0 }
/// Raw constructor. Equal to `parts / 1_000_000_000`.
pub fn from_parts(parts: i64) -> Self {
Self(parts)