mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Convert all UK spelling to US (#2138)
* all the ise * forgot a misspelling * a few more replacements * bump impl * rollback and fixes * bump impl again * Add aliases for RPC * Update on_demand.rs
This commit is contained in:
@@ -166,7 +166,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn era_initialisation_works() {
|
||||
fn era_initialization_works() {
|
||||
assert_eq!(Era::mortal(64, 42), Era::Mortal(64, 42));
|
||||
assert_eq!(Era::mortal(32768, 20000), Era::Mortal(32768, 20000));
|
||||
assert_eq!(Era::mortal(200, 513), Era::Mortal(256, 1));
|
||||
@@ -175,8 +175,8 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn quantised_clamped_era_initialisation_works() {
|
||||
// clamp 1000000 to 65536, quantise 1000001 % 65536 to the nearest 4
|
||||
fn quantized_clamped_era_initialization_works() {
|
||||
// clamp 1000000 to 65536, quantize 1000001 % 65536 to the nearest 4
|
||||
assert_eq!(Era::mortal(1000000, 1000001), Era::Mortal(65536, 1000001 % 65536 / 4 * 4));
|
||||
}
|
||||
|
||||
|
||||
@@ -252,23 +252,23 @@ impl<T:
|
||||
rstd::ops::BitAnd<Self, Output = Self>
|
||||
> SimpleBitOps for T {}
|
||||
|
||||
/// The block finalisation trait. Implementing this lets you express what should happen
|
||||
/// The block finalization trait. Implementing this lets you express what should happen
|
||||
/// for your module when the block is ending.
|
||||
pub trait OnFinalise<BlockNumber> {
|
||||
/// The block is being finalised. Implement to have something happen.
|
||||
fn on_finalise(_n: BlockNumber) {}
|
||||
pub trait OnFinalize<BlockNumber> {
|
||||
/// The block is being finalized. Implement to have something happen.
|
||||
fn on_finalize(_n: BlockNumber) {}
|
||||
}
|
||||
|
||||
impl<N> OnFinalise<N> for () {}
|
||||
impl<N> OnFinalize<N> for () {}
|
||||
|
||||
/// The block initialisation trait. Implementing this lets you express what should happen
|
||||
/// The block initialization trait. Implementing this lets you express what should happen
|
||||
/// for your module when the block is beginning (right before the first extrinsic is executed).
|
||||
pub trait OnInitialise<BlockNumber> {
|
||||
/// The block is being initialised. Implement to have something happen.
|
||||
fn on_initialise(_n: BlockNumber) {}
|
||||
pub trait OnInitialize<BlockNumber> {
|
||||
/// The block is being initialized. Implement to have something happen.
|
||||
fn on_initialize(_n: BlockNumber) {}
|
||||
}
|
||||
|
||||
impl<N> OnInitialise<N> for () {}
|
||||
impl<N> OnInitialize<N> for () {}
|
||||
|
||||
/// Off-chain computation trait.
|
||||
///
|
||||
@@ -290,14 +290,14 @@ impl<N> OffchainWorker<N> for () {}
|
||||
|
||||
macro_rules! tuple_impl {
|
||||
($one:ident,) => {
|
||||
impl<Number: Copy, $one: OnFinalise<Number>> OnFinalise<Number> for ($one,) {
|
||||
fn on_finalise(n: Number) {
|
||||
$one::on_finalise(n);
|
||||
impl<Number: Copy, $one: OnFinalize<Number>> OnFinalize<Number> for ($one,) {
|
||||
fn on_finalize(n: Number) {
|
||||
$one::on_finalize(n);
|
||||
}
|
||||
}
|
||||
impl<Number: Copy, $one: OnInitialise<Number>> OnInitialise<Number> for ($one,) {
|
||||
fn on_initialise(n: Number) {
|
||||
$one::on_initialise(n);
|
||||
impl<Number: Copy, $one: OnInitialize<Number>> OnInitialize<Number> for ($one,) {
|
||||
fn on_initialize(n: Number) {
|
||||
$one::on_initialize(n);
|
||||
}
|
||||
}
|
||||
impl<Number: Copy, $one: OffchainWorker<Number>> OffchainWorker<Number> for ($one,) {
|
||||
@@ -309,22 +309,22 @@ macro_rules! tuple_impl {
|
||||
($first:ident, $($rest:ident,)+) => {
|
||||
impl<
|
||||
Number: Copy,
|
||||
$first: OnFinalise<Number>,
|
||||
$($rest: OnFinalise<Number>),+
|
||||
> OnFinalise<Number> for ($first, $($rest),+) {
|
||||
fn on_finalise(n: Number) {
|
||||
$first::on_finalise(n);
|
||||
$($rest::on_finalise(n);)+
|
||||
$first: OnFinalize<Number>,
|
||||
$($rest: OnFinalize<Number>),+
|
||||
> OnFinalize<Number> for ($first, $($rest),+) {
|
||||
fn on_finalize(n: Number) {
|
||||
$first::on_finalize(n);
|
||||
$($rest::on_finalize(n);)+
|
||||
}
|
||||
}
|
||||
impl<
|
||||
Number: Copy,
|
||||
$first: OnInitialise<Number>,
|
||||
$($rest: OnInitialise<Number>),+
|
||||
> OnInitialise<Number> for ($first, $($rest),+) {
|
||||
fn on_initialise(n: Number) {
|
||||
$first::on_initialise(n);
|
||||
$($rest::on_initialise(n);)+
|
||||
$first: OnInitialize<Number>,
|
||||
$($rest: OnInitialize<Number>),+
|
||||
> OnInitialize<Number> for ($first, $($rest),+) {
|
||||
fn on_initialize(n: Number) {
|
||||
$first::on_initialize(n);
|
||||
$($rest::on_initialize(n);)+
|
||||
}
|
||||
}
|
||||
impl<
|
||||
|
||||
Reference in New Issue
Block a user