Skip to main content

Module test

Module test 

Source
Expand description

Test utilities

Structs§

BlockBuilder
Builds a Block for tests with a header that stays consistent with its body (the header is computed via Block::new), so it round-trips through serialization and storage. Tests start from an empty body and add messages, events, and so on.
HttpServer
A handle to a running HTTP server.

Traits§

BlockTestExt
A helper trait to simplify constructing blocks for tests.
MessageTestExt
Helper trait to simplify constructing messages for tests.
VoteTestExt
Helper trait to simplify creating certificates from votes in tests.

Functions§

make_child_block
Creates a new child of the given block, with the same timestamp.
make_first_block
Creates a block at height 0 for a new chain.