missed one case, fix withdrawal byte <> int problem
This commit is contained in:
parent
2d636ddf5a
commit
7fafebd6cf
|
@ -5,7 +5,7 @@ from eth2spec.utils.ssz.ssz_impl import hash_tree_root
|
||||||
def build_mock_validator(spec, i: int, balance: int):
|
def build_mock_validator(spec, i: int, balance: int):
|
||||||
pubkey = pubkeys[i]
|
pubkey = pubkeys[i]
|
||||||
# insecurely use pubkey as withdrawal key as well
|
# insecurely use pubkey as withdrawal key as well
|
||||||
withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX + spec.hash(pubkey)[1:]
|
withdrawal_credentials = spec.int_to_bytes(spec.BLS_WITHDRAWAL_PREFIX, length=1) + spec.hash(pubkey)[1:]
|
||||||
return spec.Validator(
|
return spec.Validator(
|
||||||
pubkey=pubkeys[i],
|
pubkey=pubkeys[i],
|
||||||
withdrawal_credentials=withdrawal_credentials,
|
withdrawal_credentials=withdrawal_credentials,
|
||||||
|
|
Loading…
Reference in New Issue