Linting fixes

This commit is contained in:
Carl Beekhuizen 2019-12-17 12:30:46 +02:00
parent 80eb721895
commit c239ffb78c
No known key found for this signature in database
GPG Key ID: 8F29E54F49E7AAB5
9 changed files with 6 additions and 12 deletions

View File

@ -25,11 +25,10 @@ from eth2spec.utils.ssz.ssz_typing import (
Bytes1, Bytes4, Bytes8, Bytes32, Bytes48, Bytes96, Bitlist, Bitvector,
)
from eth2spec.utils.bls import (
Verify,
Sign,
Verify,
Aggregate,
FastAggregateVerify,
bls_aggregate_pubkeys,
)
from eth2spec.utils.hash_function import hash

View File

@ -41,7 +41,7 @@ def apply_sig(spec, state, signed_block, proposer_index=None):
proposer_index = get_proposer_index_maybe(spec, state, block.slot, proposer_index)
privkey = privkeys[proposer_index]
domain = spec.get_domain(state, spec.DOMAIN_BEACON_PROPOSER, spec.compute_epoch_at_slot(block.slot))
message = compute_domain_wrapper_root(block, domain)
message = spec.compute_domain_wrapper_root(block, domain)
signed_block.signature = Sign(privkey, message)

View File

@ -1,5 +1,4 @@
from eth2spec.utils.bls import Sign
from eth2spec.utils.ssz.ssz_impl import hash_tree_root
def sign_block_header(spec, state, header, privkey):

View File

@ -24,7 +24,6 @@ def sign_shard_attestation(spec, beacon_state, shard_state, block, participants)
privkey,
)
)
return Aggregate(signatures)

View File

@ -20,8 +20,7 @@ def sign_shard_block(spec, beacon_state, shard_state, block, proposer_index=None
proposer_index = spec.get_shard_proposer_index(beacon_state, shard_state.shard, block.slot)
privkey = privkeys[proposer_index]
domain=spec.get_domain(beacon_state, spec.DOMAIN_SHARD_PROPOSER, compute_epoch_of_shard_slot(block.slot))
domain = spec.get_domain(beacon_state, spec.DOMAIN_SHARD_PROPOSER, spec.compute_epoch_of_shard_slot(block.slot))
message = spec.compute_domain_wrapper(block, domain)
block.signature = Sign(privkey, message)

View File

@ -1,5 +1,4 @@
from eth2spec.utils.bls import Sign
from eth2spec.utils.ssz.ssz_impl import hash_tree_root
def sign_voluntary_exit(spec, state, voluntary_exit, privkey):

View File

@ -1,6 +1,5 @@
from copy import deepcopy
from eth2spec.utils.ssz.ssz_impl import hash_tree_root
from eth2spec.utils.bls import Sign
from eth2spec.test.helpers.state import get_balance, state_transition_and_sign_block, next_slot

View File

@ -40,7 +40,7 @@ def FastAggregateVerify(PKs, message, signature):
@only_with_bls(alt_return=STUB_PUBKEY)
def bls_aggregate_pubkeys(PKs):
return bls.aggregate_pubkeys(pubkeys)
return bls.aggregate_pubkeys(PKs)
@only_with_bls(alt_return=STUB_SIGNATURE)