Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
7d80dbf3
Unverified
Commit
7d80dbf3
authored
Aug 18, 2021
by
thiolliere
Committed by
GitHub
Aug 18, 2021
Browse files
fix compilation (#3657)
parent
f3f83e3f
Pipeline
#153304
passed with stages
in 42 minutes and 48 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
xcm/xcm-builder/src/tests.rs
View file @
7d80dbf3
...
...
@@ -391,11 +391,11 @@ fn fungible_multi_asset(location: MultiLocation, amount: u128) -> MultiAsset {
#[test]
fn
weight_trader_tuple_should_work
()
{
pub
const
PARA_1
:
MultiLocation
=
X1
(
Parachain
(
1
));
pub
const
PARA_2
:
MultiLocation
=
X1
(
Parachain
(
2
));
pub
const
PARA_1
:
MultiLocation
=
X1
(
Parachain
(
1
))
.into
()
;
pub
const
PARA_2
:
MultiLocation
=
X1
(
Parachain
(
2
))
.into
()
;
parameter_types!
{
pub
static
HereWeightPrice
:
(
AssetId
,
u128
)
=
(
Here
.into
(),
WEIGHT_PER_SECOND
.into
());
pub
static
HereWeightPrice
:
(
AssetId
,
u128
)
=
(
Here
.into
()
.into
()
,
WEIGHT_PER_SECOND
.into
());
pub
static
PARA1WeightPrice
:
(
AssetId
,
u128
)
=
(
PARA_1
.into
(),
WEIGHT_PER_SECOND
.into
());
}
...
...
@@ -409,11 +409,11 @@ fn weight_trader_tuple_should_work() {
let
mut
traders
=
Traders
::
new
();
// trader one buys weight
assert_eq!
(
traders
.buy_weight
(
5
,
fungible_multi_asset
(
Here
,
10
)
.into
()),
Ok
(
fungible_multi_asset
(
Here
,
5
)
.into
()),
traders
.buy_weight
(
5
,
fungible_multi_asset
(
Here
.into
()
,
10
)
.into
()),
Ok
(
fungible_multi_asset
(
Here
.into
()
,
5
)
.into
()),
);
// trader one refunds
assert_eq!
(
traders
.refund_weight
(
2
),
Some
(
fungible_multi_asset
(
Here
,
2
)));
assert_eq!
(
traders
.refund_weight
(
2
),
Some
(
fungible_multi_asset
(
Here
.into
()
,
2
)));
let
mut
traders
=
Traders
::
new
();
// trader one failed; trader two buys weight
...
...
xcm/xcm-builder/tests/scenarios.rs
View file @
7d80dbf3
...
...
@@ -38,7 +38,6 @@ fn buy_execution<C>(debt: Weight) -> Order<C> {
weight
:
0
,
debt
,
halt_on_error
:
false
,
orders
:
vec!
[],
instructions
:
vec!
[],
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment