Docs
chromia.com

TYPE

block

type block

A test block builder; i.e. a builder for test blockchain blocks.

A test block consists of a list of test transactions that are executed when the block is built. A test transaction consists of a list of test operation calls, and a list of signing keypairs.

Test block timestamps

The timestamps of Rell test blocks are deterministic, and determined by the following rules:

  1. If the next block's timestamp was set explicitly via rell.test.set_next_block_time() or rell.test.set_next_block_time_delta(), that timestamp is used for the next block, and is then discarded (and will not be used by subsequent blocks).
  2. If the next block's timestamp was not set explicitly, and there is a previous block, the next block's timestamp is the timestamp of the previous block plus the block interval (rell.test.block_interval, which can be set with rell.test.set_block_interval()).
  3. If the next block's timestamp was not set explicitly, and there is no previous block, the timestamp of the next (and first) block will be 2020-01-01 00:00:00 UTC.

See Also

  1. Builder pattern - Wikipedia
  2. rell.test.tx - Rell Standard Library
  3. rell.test.op - Rell Standard Library
  4. rell.test.set_next_block_time() - Rell Standard Library
  5. rell.test.set_next_block_time_delta() - Rell Standard Library
  6. rell.test.block_interval - Rell Standard Library
  7. rell.test.set_block_interval() - Rell Standard Library
  8. rell.test.block - Chromia Documentation

Since 0.10.4

Methods

block
copy
Copy this test block builder.
run
Build a test block from this test block builder.
run_must_fail
Build a test block from this test block builder, asserting that the building fails (i.e. throws
tx
Add a list of test transactions to this test block builder.