# Struct ethcore::verification::queue::VerificationQueue [−] [src]

    pub struct VerificationQueue<K: Kind> { /* fields omitted */ }

A queue of items to be verified. Sits between network or other I/O and the `BlockChain`. Keeps them in the same order as inserted, minus invalid items.

## Methods

### `impl<K: Kind> VerificationQueue<K>`
[src]

#### `fn new(config: Config,
engine: Arc<Engine>,
message_channel: IoChannel<ClientIoMessage>,
check_seal: bool)
-> Self`

Creates a new queue instance.

#### `fn clear(&self)`

Clear the queue and stop verification activity.

#### `fn flush(&self)`

Wait for unverified queue to be empty

#### `fn status(&self, hash: &H256) -> Status`

Check if the item is currently in the queue

#### `fn import(&self, input: K::Input) -> ImportResult`

Add a block to the queue.

#### `fn mark_as_bad(&self, hashes: &[H256])`

Mark given item and all its children as bad. pauses verification until complete.

#### `fn mark_as_good(&self, hashes: &[H256]) -> bool`

Mark given item as processed. Returns true if the queue becomes empty.

#### `fn drain(&self, max: usize) -> Vec<K::Verified>`

Removes up to `max` verified items from the queue

#### `fn queue_info(&self) -> QueueInfo`

Get queue status.

#### `fn total_difficulty(&self) -> U256`

Get the total difficulty of all the blocks in the queue.

#### `fn num_verifiers(&self) -> usize`

Get the current number of working verifiers.

#### `fn collect_garbage(&self)`

Optimise memory footprint of the heap fields, and adjust the number of threads to better suit the workload.

## Trait Implementations

### `impl<K: Kind> MayPanic for VerificationQueue<K>`
[src]

#### `fn on_panic<F>(&self, closure: F) where F: OnPanicListener`

`closure` will be invoked whenever panic in thread is caught

### `impl<K: Kind> Drop for VerificationQueue<K>`
[src]

#### `fn drop(&mut self)`

A method called when the value goes out of scope. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)