mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
fix bug where we over-eagerly remove backing spans for candidates we validate ourselves (#2142)
* fix bug where we over-eagerly remove backing spans for candidates we validate ourselves * jaeger: watch importing of statements
This commit is contained in:
committed by
GitHub
parent
a141a6fbc9
commit
2c1a78782e
@@ -63,6 +63,17 @@ pub enum Statement {
|
||||
}
|
||||
|
||||
impl Statement {
|
||||
/// Get the candidate hash referenced by this statement.
|
||||
///
|
||||
/// If this is a `Statement::Seconded`, this does hash the candidate receipt, which may be expensive
|
||||
/// for large candidates.
|
||||
pub fn candidate_hash(&self) -> CandidateHash {
|
||||
match *self {
|
||||
Statement::Valid(ref h) | Statement::Invalid(ref h) => *h,
|
||||
Statement::Seconded(ref c) => c.hash(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Transform this statement into its compact version, which references only the hash
|
||||
/// of the candidate.
|
||||
pub fn to_compact(&self) -> CompactStatement {
|
||||
|
||||
Reference in New Issue
Block a user