mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 16:21:06 +00:00
Upgrade codec to 2.0 and bitvec to 0.20 (companion) (#2343)
* upgrade codec and bitvec * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
6efeb1ee13
commit
29f12f3f48
@@ -133,16 +133,16 @@ impl Decode for BEBlockNumber {
|
||||
#[derive(Debug, Encode, Decode)]
|
||||
enum State {
|
||||
/// Candidate data was first observed at the given time but is not available in any block.
|
||||
#[codec(index = "0")]
|
||||
#[codec(index = 0)]
|
||||
Unavailable(BETimestamp),
|
||||
/// The candidate was first observed at the given time and was included in the given list of unfinalized blocks, which may be
|
||||
/// empty. The timestamp here is not used for pruning. Either one of these blocks will be finalized or the state will regress to
|
||||
/// `State::Unavailable`, in which case the same timestamp will be reused. Blocks are sorted ascending first by block number and
|
||||
/// then hash.
|
||||
#[codec(index = "1")]
|
||||
#[codec(index = 1)]
|
||||
Unfinalized(BETimestamp, Vec<(BEBlockNumber, Hash)>),
|
||||
/// Candidate data has appeared in a finalized block and did so at the given time.
|
||||
#[codec(index = "2")]
|
||||
#[codec(index = 2)]
|
||||
Finalized(BETimestamp)
|
||||
}
|
||||
|
||||
@@ -967,7 +967,9 @@ fn process_message(
|
||||
}
|
||||
AvailabilityStoreMessage::QueryChunkAvailability(candidate, validator_index, tx) => {
|
||||
let a = load_meta(&subsystem.db, &candidate)?
|
||||
.map_or(false, |m| *m.chunks_stored.get(validator_index as usize).unwrap_or(&false));
|
||||
.map_or(false, |m|
|
||||
*m.chunks_stored.get(validator_index as usize).as_deref().unwrap_or(&false)
|
||||
);
|
||||
let _ = tx.send(a);
|
||||
}
|
||||
AvailabilityStoreMessage::StoreChunk {
|
||||
|
||||
Reference in New Issue
Block a user