utilize bls_domain directly for deposits

This commit is contained in:
Danny Ryan
2019-05-21 11:30:38 -06:00
parent 7a9097ec23
commit 847fcf52cc
3 changed files with 20 additions and 7 deletions

View File

@@ -24,6 +24,7 @@ from eth2spec.phase0.spec import (
VoluntaryExit,
# functions
convert_to_indexed,
bls_domain,
get_active_validator_indices,
get_attesting_indices,
get_block_root,
@@ -144,9 +145,9 @@ def build_deposit_data(state, pubkey, privkey, amount):
signature = bls.sign(
message_hash=signing_root(deposit_data),
privkey=privkey,
domain=get_domain(
state,
domain=bls_domain(
spec.DOMAIN_DEPOSIT,
spec.DEPOSIT_FORK_VERSION,
)
)
deposit_data.signature = signature