mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 11:21:08 +00:00
* Some work * Fixes * Tests builds * Fixes * Fixes * Fixes * Fixes * Fixes * Formatting * Formatting * Fix * Fixes * Fixes * Fixes * Fixes * Update Cargo.lock * Bump * Fixes
This commit is contained in:
@@ -24,7 +24,7 @@ use polkadot_primitives::v1::{
|
||||
AssignmentId, AssignmentPair, CandidateHash, CoreIndex, GroupIndex, SessionInfo, ValidatorIndex,
|
||||
};
|
||||
use sc_keystore::LocalKeystore;
|
||||
use sp_application_crypto::Public;
|
||||
use sp_application_crypto::ByteArray;
|
||||
|
||||
use merlin::Transcript;
|
||||
use schnorrkel::vrf::VRFInOut;
|
||||
|
||||
@@ -28,6 +28,10 @@ use std::time::Duration;
|
||||
|
||||
type VirtualOverseer = test_helpers::TestSubsystemContextHandle<ApprovalDistributionMessage>;
|
||||
|
||||
fn dummy_signature() -> polkadot_primitives::v1::ValidatorSignature {
|
||||
sp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64])
|
||||
}
|
||||
|
||||
fn test_harness<T: Future<Output = VirtualOverseer>>(
|
||||
mut state: State,
|
||||
test_fn: impl FnOnce(VirtualOverseer) -> T,
|
||||
@@ -470,7 +474,7 @@ fn import_approval_happy_path() {
|
||||
block_hash: hash,
|
||||
candidate_index,
|
||||
validator: validator_index,
|
||||
signature: Default::default(),
|
||||
signature: dummy_signature(),
|
||||
};
|
||||
let msg = protocol_v1::ApprovalDistributionMessage::Approvals(vec![approval.clone()]);
|
||||
send_message_from_peer(overseer, &peer_b, msg).await;
|
||||
@@ -537,7 +541,7 @@ fn import_approval_bad() {
|
||||
block_hash: hash,
|
||||
candidate_index,
|
||||
validator: validator_index,
|
||||
signature: Default::default(),
|
||||
signature: dummy_signature(),
|
||||
};
|
||||
let msg = protocol_v1::ApprovalDistributionMessage::Approvals(vec![approval.clone()]);
|
||||
send_message_from_peer(overseer, &peer_b, msg).await;
|
||||
@@ -867,7 +871,7 @@ fn import_remotely_then_locally() {
|
||||
block_hash: hash,
|
||||
candidate_index,
|
||||
validator: validator_index,
|
||||
signature: Default::default(),
|
||||
signature: dummy_signature(),
|
||||
};
|
||||
let msg = protocol_v1::ApprovalDistributionMessage::Approvals(vec![approval.clone()]);
|
||||
send_message_from_peer(overseer, peer, msg).await;
|
||||
@@ -922,7 +926,7 @@ fn sends_assignments_even_when_state_is_approved() {
|
||||
block_hash: hash,
|
||||
candidate_index,
|
||||
validator: validator_index,
|
||||
signature: Default::default(),
|
||||
signature: dummy_signature(),
|
||||
};
|
||||
|
||||
overseer_send(
|
||||
|
||||
@@ -869,7 +869,7 @@ fn relays_collation_protocol_messages() {
|
||||
let collator_protocol_message = protocol_v1::CollatorProtocolMessage::Declare(
|
||||
Sr25519Keyring::Alice.public().into(),
|
||||
Default::default(),
|
||||
Default::default(),
|
||||
sp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64]),
|
||||
);
|
||||
|
||||
let message =
|
||||
|
||||
@@ -36,7 +36,7 @@ use rand::{seq::SliceRandom as _, SeedableRng};
|
||||
use rand_chacha::ChaCha20Rng;
|
||||
|
||||
use sc_network::Multiaddr;
|
||||
use sp_application_crypto::{AppKey, Public};
|
||||
use sp_application_crypto::{AppKey, ByteArray};
|
||||
use sp_keystore::{CryptoStore, SyncCryptoStorePtr};
|
||||
|
||||
use polkadot_node_network_protocol::{
|
||||
|
||||
@@ -895,12 +895,12 @@ fn test_dispute_distribution_msg() -> DisputeDistributionMessage {
|
||||
session_index: 0,
|
||||
invalid_vote: InvalidDisputeVote {
|
||||
validator_index: ValidatorIndex(0),
|
||||
signature: Default::default(),
|
||||
signature: sp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64]),
|
||||
kind: InvalidDisputeStatementKind::Explicit,
|
||||
},
|
||||
valid_vote: ValidDisputeVote {
|
||||
validator_index: ValidatorIndex(0),
|
||||
signature: Default::default(),
|
||||
signature: sp_core::crypto::UncheckedFrom::unchecked_from([2u8; 64]),
|
||||
kind: ValidDisputeStatementKind::Explicit,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ use polkadot_primitives::v1::{
|
||||
BlockNumber, CandidateHash, CandidateIndex, CoreIndex, Hash, Header, ValidatorIndex,
|
||||
ValidatorSignature,
|
||||
};
|
||||
use sp_application_crypto::Public;
|
||||
use sp_application_crypto::ByteArray;
|
||||
use sp_consensus_babe as babe_primitives;
|
||||
|
||||
/// Validators assigning to check a particular candidate are split up into tranches.
|
||||
|
||||
@@ -541,7 +541,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi
|
||||
im_online: Default::default(),
|
||||
authority_discovery: westend::AuthorityDiscoveryConfig { keys: vec![] },
|
||||
vesting: westend::VestingConfig { vesting: vec![] },
|
||||
sudo: westend::SudoConfig { key: endowed_accounts[0].clone() },
|
||||
sudo: westend::SudoConfig { key: Some(endowed_accounts[0].clone()) },
|
||||
hrmp: Default::default(),
|
||||
configuration: westend::ConfigurationConfig {
|
||||
config: default_parachains_host_configuration(),
|
||||
@@ -1034,7 +1034,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
|
||||
collective: Default::default(),
|
||||
membership: Default::default(),
|
||||
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig { keys: vec![] },
|
||||
sudo: rococo_runtime::SudoConfig { key: endowed_accounts[0].clone() },
|
||||
sudo: rococo_runtime::SudoConfig { key: Some(endowed_accounts[0].clone()) },
|
||||
paras: rococo_runtime::ParasConfig { paras: vec![] },
|
||||
hrmp: Default::default(),
|
||||
configuration: rococo_runtime::ConfigurationConfig {
|
||||
@@ -1470,7 +1470,7 @@ pub fn westend_testnet_genesis(
|
||||
im_online: Default::default(),
|
||||
authority_discovery: westend::AuthorityDiscoveryConfig { keys: vec![] },
|
||||
vesting: westend::VestingConfig { vesting: vec![] },
|
||||
sudo: westend::SudoConfig { key: root_key },
|
||||
sudo: westend::SudoConfig { key: Some(root_key) },
|
||||
hrmp: Default::default(),
|
||||
configuration: westend::ConfigurationConfig {
|
||||
config: default_parachains_host_configuration(),
|
||||
@@ -1541,7 +1541,7 @@ pub fn rococo_testnet_genesis(
|
||||
collective: Default::default(),
|
||||
membership: Default::default(),
|
||||
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig { keys: vec![] },
|
||||
sudo: rococo_runtime::SudoConfig { key: root_key.clone() },
|
||||
sudo: rococo_runtime::SudoConfig { key: Some(root_key.clone()) },
|
||||
hrmp: Default::default(),
|
||||
configuration: rococo_runtime::ConfigurationConfig {
|
||||
config: polkadot_runtime_parachains::configuration::HostConfiguration {
|
||||
|
||||
@@ -56,7 +56,7 @@ use polkadot_primitives::v1::{
|
||||
ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_core::{traits::SpawnNamed, Public};
|
||||
use sp_core::{traits::SpawnNamed, ByteArray};
|
||||
use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr};
|
||||
use std::{
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
|
||||
@@ -22,7 +22,7 @@ use lru::LruCache;
|
||||
|
||||
use parity_scale_codec::Encode;
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_core::crypto::Public;
|
||||
use sp_core::crypto::ByteArray;
|
||||
use sp_keystore::{CryptoStore, SyncCryptoStorePtr};
|
||||
|
||||
use polkadot_node_subsystem::{SubsystemContext, SubsystemSender};
|
||||
|
||||
@@ -158,7 +158,7 @@ fn polkadot_testnet_genesis(
|
||||
authority_discovery: runtime::AuthorityDiscoveryConfig { keys: vec![] },
|
||||
claims: runtime::ClaimsConfig { claims: vec![], vesting: vec![] },
|
||||
vesting: runtime::VestingConfig { vesting: vec![] },
|
||||
sudo: runtime::SudoConfig { key: root_key },
|
||||
sudo: runtime::SudoConfig { key: Some(root_key) },
|
||||
configuration: runtime::ConfigurationConfig {
|
||||
config: polkadot_runtime_parachains::configuration::HostConfiguration {
|
||||
validation_upgrade_frequency: 10u32,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use polkadot_test_service::*;
|
||||
use sp_keyring::Sr25519Keyring::{Alice, Bob};
|
||||
use sp_keyring::Sr25519Keyring::{Alice, Bob, Charlie};
|
||||
|
||||
#[substrate_test_utils::test]
|
||||
async fn call_function_actually_work() {
|
||||
@@ -23,7 +23,7 @@ async fn call_function_actually_work() {
|
||||
run_validator_node(tokio::runtime::Handle::current(), Alice, || {}, Vec::new(), None);
|
||||
|
||||
let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer {
|
||||
dest: Default::default(),
|
||||
dest: Charlie.to_account_id().into(),
|
||||
value: 1,
|
||||
});
|
||||
let output = alice.send_extrinsic(function, Bob).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user