Exemple #1
0
def _score_block(block, store, state, config):
    return LMDGHOSTScore((
        sum(
            _effective_balance_for_validator(state, validator_index)
            for validator_index, target in store._context.latest_messages
            if store.get_ancestor(target.root, block.slot) == block),
        score_block_by_root(block.message.hash_tree_root),
    ))
def _score_block(block, store, state, config):
    return sum(
        _effective_balance_for_validator(state, validator_index)
        for validator_index, target in store._context.latest_messages
        if store.get_ancestor(target.root, block.slot) == block
    ) + score_block_by_root(block.signing_root)