Fix tests
This commit is contained in:
parent
dc56d87eef
commit
05f1a44a38
|
@ -23,13 +23,13 @@ Operations:
|
|||
|-------------------------|----------------------|----------------------|--------------------------------------------------------|
|
||||
| `attestation` | `Attestation` | `attestation` | `process_attestation(state, attestation)` |
|
||||
| `attester_slashing` | `AttesterSlashing` | `attester_slashing` | `process_attester_slashing(state, attester_slashing)` |
|
||||
| `parent_block_header` | `Block` | `block` | `process_block_header(state, block)` |
|
||||
| `block_header` | `Block` | `block` | `process_block_header(state, block)` |
|
||||
| `deposit` | `Deposit` | `deposit` | `process_deposit(state, deposit)` |
|
||||
| `proposer_slashing` | `ProposerSlashing` | `proposer_slashing` | `process_proposer_slashing(state, proposer_slashing)` |
|
||||
| `transfer` | `Transfer` | `transfer` | `process_transfer(state, transfer)` |
|
||||
| `voluntary_exit` | `VoluntaryExit` | `voluntary_exit` | `process_voluntary_exit(state, voluntary_exit)` |
|
||||
|
||||
Note that `parent_block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here.
|
||||
Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here.
|
||||
|
||||
The resulting state should match the expected `post` state, or if the `post` state is left blank,
|
||||
the handler should reject the input operation as invalid.
|
||||
|
|
|
@ -42,8 +42,8 @@ if __name__ == "__main__":
|
|||
create_suite('attestation', 'mainnet', lambda: generate_from_tests(test_process_attestation)),
|
||||
create_suite('attester_slashing', 'minimal', lambda: generate_from_tests(test_process_attester_slashing)),
|
||||
create_suite('attester_slashing', 'mainnet', lambda: generate_from_tests(test_process_attester_slashing)),
|
||||
create_suite('parent_block_header', 'minimal', lambda: generate_from_tests(test_process_block_header)),
|
||||
create_suite('parent_block_header', 'mainnet', lambda: generate_from_tests(test_process_block_header)),
|
||||
create_suite('block_header', 'minimal', lambda: generate_from_tests(test_process_block_header)),
|
||||
create_suite('block_header', 'mainnet', lambda: generate_from_tests(test_process_block_header)),
|
||||
create_suite('deposit', 'minimal', lambda: generate_from_tests(test_process_deposit)),
|
||||
create_suite('deposit', 'mainnet', lambda: generate_from_tests(test_process_deposit)),
|
||||
create_suite('proposer_slashing', 'minimal', lambda: generate_from_tests(test_process_proposer_slashing)),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from copy import deepcopy
|
||||
|
||||
from eth2spec.test.helpers.parent_block_header import sign_block_header
|
||||
from eth2spec.test.helpers.block_header import sign_block_header
|
||||
from eth2spec.test.helpers.keys import pubkey_to_privkey
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from eth2spec.test.context import spec_state_test, expect_assertion_error, always_bls, with_all_phases
|
||||
from eth2spec.test.helpers.parent_block_header import sign_block_header
|
||||
from eth2spec.test.helpers.block_header import sign_block_header
|
||||
from eth2spec.test.helpers.keys import privkeys
|
||||
from eth2spec.test.helpers.proposer_slashings import get_valid_proposer_slashing
|
||||
from eth2spec.test.helpers.state import get_balance
|
||||
|
|
Loading…
Reference in New Issue