mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Round out the runtime
Ensures the block's size limit is respected. Defines a policy for weights. While I'm unsure I want to commit to this forever, I do want to acknowledge it's valid and well-defined. Cleans up the `serai-runtime` crate a bit with further modules in the `wasm` folder.
This commit is contained in:
@@ -21,6 +21,8 @@ impl frame_system::Config for Test {
|
||||
type AccountId = sp_core::sr25519::Public;
|
||||
type Lookup = frame_support::sp_runtime::traits::IdentityLookup<Self::AccountId>;
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
type BlockLength = serai_core_pallet::Limits;
|
||||
type BlockWeights = serai_core_pallet::Limits;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)]
|
||||
|
||||
@@ -10,7 +10,7 @@ pub type CoinsEvent = serai_abi::coins::Event;
|
||||
#[test]
|
||||
fn mint() {
|
||||
new_test_ext().execute_with(|| {
|
||||
Core::start_transaction();
|
||||
Core::start_transaction(0);
|
||||
|
||||
// minting u64::MAX should work
|
||||
let coin = Coin::Serai;
|
||||
@@ -51,7 +51,7 @@ fn mint() {
|
||||
#[test]
|
||||
fn burn_with_instruction() {
|
||||
new_test_ext().execute_with(|| {
|
||||
Core::start_transaction();
|
||||
Core::start_transaction(0);
|
||||
|
||||
// mint some coin
|
||||
let coin = Coin::External(ExternalCoin::Bitcoin);
|
||||
@@ -106,7 +106,7 @@ fn burn_with_instruction() {
|
||||
#[test]
|
||||
fn transfer() {
|
||||
new_test_ext().execute_with(|| {
|
||||
Core::start_transaction();
|
||||
Core::start_transaction(0);
|
||||
|
||||
// mint some coin
|
||||
let coin = Coin::External(ExternalCoin::Bitcoin);
|
||||
|
||||
Reference in New Issue
Block a user