Expand description
Test utilities
Structs§
- Block
Builder - Builds a
Blockfor tests with a header that stays consistent with its body (the header is computed viaBlock::new), so it round-trips through serialization and storage. Tests start from an empty body and add messages, events, and so on. - Http
Server - A handle to a running HTTP server.
Traits§
- Block
Test Ext - A helper trait to simplify constructing blocks for tests.
- Message
Test Ext - Helper trait to simplify constructing messages for tests.
- Vote
Test Ext - 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.