File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
core/src/verification/queue Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ pub trait Kind: 'static + Sized + Send + Sync {
6767 /// The third stage: completely verified.
6868 type Verified : Sized + Send + BlockLike + MemUsage ;
6969
70+ fn name ( ) -> & ' static str ;
71+
7072 /// Attempt to create the `Unverified` item from the input.
7173 fn create ( input : Self :: Input , engine : & CodeChainEngine ) -> Result < Self :: Unverified , Error > ;
7274
@@ -115,6 +117,10 @@ pub mod headers {
115117 type Unverified = Header ;
116118 type Verified = Header ;
117119
120+ fn name ( ) -> & ' static str {
121+ "Headers"
122+ }
123+
118124 fn create ( input : Self :: Input , engine : & CodeChainEngine ) -> Result < Self :: Unverified , Error > {
119125 // FIXME: this doesn't seem to match with full block verification
120126 verify_header_basic ( & input) ?;
@@ -157,6 +163,10 @@ pub mod blocks {
157163 type Unverified = Unverified ;
158164 type Verified = PreverifiedBlock ;
159165
166+ fn name ( ) -> & ' static str {
167+ "Blocks"
168+ }
169+
160170 fn create ( input : Self :: Input , engine : & CodeChainEngine ) -> Result < Self :: Unverified , Error > {
161171 match verify_block_basic ( & input. header , & input. bytes )
162172 . and_then ( |_| verify_header_with_engine ( & input. header , engine) )
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ impl<K: Kind> VerificationQueue<K> {
162162 let deleting = Arc :: clone ( & deleting) ;
163163
164164 let handle = thread:: Builder :: new ( )
165- . name ( format ! ( "Verifier #{}" , i) )
165+ . name ( format ! ( "{} Verifier #{}" , K :: name ( ) , i) )
166166 . spawn ( move || {
167167 VerificationQueue :: verify (
168168 & verification,
You can’t perform that action at this time.
0 commit comments