Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadBlockTests ¶
LoadBlockTests loads a block test JSON file.
Types ¶
type BlockTest ¶
type BlockTest struct { Genesis *types.Block Json *btJSON // contains filtered or unexported fields }
Block Test JSON Format
func (*BlockTest) InsertPreState ¶
InsertPreState populates the given database with the genesis accounts defined by the test.
func (*BlockTest) TryBlocksInsert ¶
func (t *BlockTest) TryBlocksInsert(chainManager *core.ChainManager) error
See https://github.com/ethereum/tests/wiki/Blockchain-Tests-II
Whether a block is valid or not is a bit subtle, it's defined by presence of blockHeader, transactions and uncleHeaders fields. If they are missing, the block is invalid and we must verify that we do not accept it. Since some tests mix valid and invalid blocks we need to check this for every block. If a block is invalid it does not necessarily fail the test, if it's invalidness is expected we are expected to ignore it and continue processing and then validate the post state.
type TransactionTest ¶
type TransactionTest struct { Rlp string Sender string Transaction TtTransaction }
Click to show internal directories.
Click to hide internal directories.