Unverified Commit 26aee2b2 authored by zjb0807's avatar zjb0807 Committed by GitHub
Browse files

Companion for #9512 (Support test-runner to submit unsigned_extrinsic) (#3589)

* update polkadot-simnet

* update Substrate

Co-authored-by: parity-processbot <>
parent dcde0d00
Pipeline #151756 canceled with stages
in 4 minutes and 3 seconds
This diff is collapsed.
......@@ -129,7 +129,7 @@ where
// note the call (pre-image?) of the call.
node.submit_extrinsic(
DemocracyCall::note_preimage(call.into().encode()),
whales[0].clone(),
Some(whales[0].clone()),
)
.await?;
node.seal_blocks(1).await;
......@@ -161,7 +161,8 @@ where
length,
);
node.submit_extrinsic(proposal.clone(), council_collective[0].clone()).await?;
node.submit_extrinsic(proposal.clone(), Some(council_collective[0].clone()))
.await?;
node.seal_blocks(1).await;
// fetch proposal index from event emitted by the runtime
......@@ -181,13 +182,13 @@ where
// vote
for member in &council_collective[1..] {
let call = CouncilCollectiveCall::vote(hash.clone(), index, true);
node.submit_extrinsic(call, member.clone()).await?;
node.submit_extrinsic(call, Some(member.clone())).await?;
}
node.seal_blocks(1).await;
// close vote
let call = CouncilCollectiveCall::close(hash, index, weight, length);
node.submit_extrinsic(call, council_collective[0].clone()).await?;
node.submit_extrinsic(call, Some(council_collective[0].clone())).await?;
node.seal_blocks(1).await;
// assert that proposal has been passed on chain
......@@ -226,7 +227,7 @@ where
length,
);
node.submit_extrinsic(proposal, technical_collective[0].clone()).await?;
node.submit_extrinsic(proposal, Some(technical_collective[0].clone())).await?;
node.seal_blocks(1).await;
let events = node.events();
......@@ -249,13 +250,13 @@ where
// vote
for member in &technical_collective[1..] {
let call = TechnicalCollectiveCall::vote(hash.clone(), index, true);
node.submit_extrinsic(call, member.clone()).await?;
node.submit_extrinsic(call, Some(member.clone())).await?;
}
node.seal_blocks(1).await;
// close vote
let call = TechnicalCollectiveCall::close(hash, index, weight, length);
node.submit_extrinsic(call, technical_collective[0].clone()).await?;
node.submit_extrinsic(call, Some(technical_collective[0].clone())).await?;
node.seal_blocks(1).await;
// assert that fast-track proposal has been passed on chain
......@@ -307,7 +308,7 @@ where
},
);
for whale in whales {
node.submit_extrinsic(call.clone(), whale).await?;
node.submit_extrinsic(call.clone(), Some(whale)).await?;
}
// wait for fast track period.
......@@ -395,7 +396,7 @@ mod tests {
node.seal_blocks(1).await;
// submit extrinsics
let alice = MultiSigner::from(Alice.public()).into_account();
node.submit_extrinsic(system::Call::remark((b"hello world").to_vec()), alice)
node.submit_extrinsic(system::Call::remark((b"hello world").to_vec()), Some(alice))
.await
.unwrap();
......
......@@ -74,7 +74,7 @@ fn main() -> Result<(), Box<dyn Error>> {
);
// post upgrade tests, a simple balance transfer
node.submit_extrinsic(balances::Call::transfer(dest.into(), balance), from)
node.submit_extrinsic(balances::Call::transfer(dest.into(), balance), Some(from))
.await?;
node.seal_blocks(1).await;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment