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:
If the next block's timestamp was set explicitly via
rell.test.set_next_block_time()
orrell.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).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 withrell.test.set_block_interval()
).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
.
Since
0.10.4
See also
Constructors
Construct a test block builder from the specified list of transactions.
Construct a test block builder from the specified transactions.
Construct a test block builder with a single test transaction consisting of the specified list of test operation calls.
Construct a test block builder with a single test transaction consisting of the specified test operation calls.
Functions
Copy this test block builder.
Build a test block from this test block builder, asserting that the building fails (i.e. throws an exception).
Typically used to test operation calls that must throw an exception.
Build a test block from this test block builder, asserting that the building fails; i.e. throws an exception; with the given exception message.
Typically used to test operation calls that must throw an exception.
Add a single test transaction to this test block builder; the test transaction consisting of the specified list of test operation calls.
Add a list of test transactions to this test block builder.
Add a single test transaction to this test block builder; the test transaction consisting of the specified test operation calls.
Add test transactions to this test block builder.