mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 07:27:55 +00:00
Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::*;
|
||||
use codec::Decode;
|
||||
use frame_support::{
|
||||
assert_ok, impl_outer_origin, parameter_types,
|
||||
weights::{GetDispatchInfo, Weight},
|
||||
weights::Weight,
|
||||
};
|
||||
use sp_core::{
|
||||
H256,
|
||||
@@ -61,6 +61,7 @@ impl frame_system::Trait for Test {
|
||||
type Event = ();
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type Version = ();
|
||||
@@ -192,15 +193,6 @@ fn should_submit_unsigned_transaction_on_chain() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weights_work() {
|
||||
// must have a default weight.
|
||||
let default_call = <Call<Test>>::submit_price(10);
|
||||
let info = default_call.get_dispatch_info();
|
||||
// aka. `let info = <Call<Test> as GetDispatchInfo>::get_dispatch_info(&default_call);`
|
||||
assert_eq!(info.weight, 10_000);
|
||||
}
|
||||
|
||||
fn price_oracle_response(state: &mut testing::OffchainState) {
|
||||
state.expect_request(0, testing::PendingRequest {
|
||||
method: "GET".into(),
|
||||
|
||||
Reference in New Issue
Block a user