mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Companion to "Updating scale to v3" (#4958)
* Updating dependencies * Adapting code to scale v3 * Upgrade bitvec to 1.0.0 * Fix bitvec arithmetics * Update Cargo.lock * Update sp-io * Fixing the build * Yanked scale-info 2.0.0 Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -148,7 +148,7 @@ enum State {
|
||||
struct CandidateMeta {
|
||||
state: State,
|
||||
data_available: bool,
|
||||
chunks_stored: BitVec<BitOrderLsb0, u8>,
|
||||
chunks_stored: BitVec<u8, BitOrderLsb0>,
|
||||
}
|
||||
|
||||
fn query_inner<D: Decode>(
|
||||
@@ -727,7 +727,7 @@ fn note_block_backed(
|
||||
let meta = CandidateMeta {
|
||||
state: State::Unavailable(now.into()),
|
||||
data_available: false,
|
||||
chunks_stored: bitvec::bitvec![BitOrderLsb0, u8; 0; n_validators],
|
||||
chunks_stored: bitvec::bitvec![u8, BitOrderLsb0; 0; n_validators],
|
||||
};
|
||||
|
||||
let prune_at = now + pruning_config.keep_unavailable_for;
|
||||
@@ -1210,7 +1210,7 @@ fn store_available_data(
|
||||
}
|
||||
|
||||
meta.data_available = true;
|
||||
meta.chunks_stored = bitvec::bitvec![BitOrderLsb0, u8; 1; n_validators];
|
||||
meta.chunks_stored = bitvec::bitvec![u8, BitOrderLsb0; 1; n_validators];
|
||||
|
||||
write_meta(&mut tx, &subsystem.config, &candidate_hash, &meta);
|
||||
write_available_data(&mut tx, &subsystem.config, &candidate_hash, &available_data);
|
||||
|
||||
@@ -291,7 +291,7 @@ fn store_chunk_works() {
|
||||
&candidate_hash,
|
||||
&CandidateMeta {
|
||||
data_available: false,
|
||||
chunks_stored: bitvec::bitvec![BitOrderLsb0, u8; 0; n_validators],
|
||||
chunks_stored: bitvec::bitvec![u8, BitOrderLsb0; 0; n_validators],
|
||||
state: State::Unavailable(BETimestamp(0)),
|
||||
},
|
||||
);
|
||||
@@ -364,7 +364,7 @@ fn query_chunk_checks_meta() {
|
||||
&CandidateMeta {
|
||||
data_available: false,
|
||||
chunks_stored: {
|
||||
let mut v = bitvec::bitvec![BitOrderLsb0, u8; 0; n_validators];
|
||||
let mut v = bitvec::bitvec![u8, BitOrderLsb0; 0; n_validators];
|
||||
v.set(validator_index.0 as usize, true);
|
||||
v
|
||||
},
|
||||
@@ -528,7 +528,7 @@ fn query_all_chunks_works() {
|
||||
&candidate_hash_2,
|
||||
&CandidateMeta {
|
||||
data_available: false,
|
||||
chunks_stored: bitvec::bitvec![BitOrderLsb0, u8; 0; n_validators as _],
|
||||
chunks_stored: bitvec::bitvec![u8, BitOrderLsb0; 0; n_validators as _],
|
||||
state: State::Unavailable(BETimestamp(0)),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user