Skip to content

Commit

Permalink
Problem: ReadTheDocs build fails. (#2419)
Browse files Browse the repository at this point in the history
Solution: Move the schema spec for validator election to common directory so
that the yaml schema files can be found
  • Loading branch information
kansi authored and ttmc committed Jul 30, 2018
1 parent 199adc8 commit 5adc1ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions bigchaindb/common/schema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def _load_schema(name, path=__file__):
_, TX_SCHEMA_TRANSFER = _load_schema('transaction_transfer_' +
TX_SCHEMA_VERSION)

_, TX_SCHEMA_VALIDATOR_ELECTION = _load_schema('transaction_validator_election_' +
TX_SCHEMA_VERSION)


def _validate_schema(schema, body):
"""Validate data against a schema"""
Expand Down
9 changes: 2 additions & 7 deletions bigchaindb/upsert_validator/validator_election.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
from bigchaindb.tendermint_utils import key_from_base64
from bigchaindb.common.crypto import (public_key_from_ed25519_key)
from bigchaindb.common.transaction import Transaction
from bigchaindb.common.schema import (_load_schema,
_validate_schema,
TX_SCHEMA_VERSION,
from bigchaindb.common.schema import (_validate_schema,
TX_SCHEMA_VALIDATOR_ELECTION,
TX_SCHEMA_COMMON,
TX_SCHEMA_CREATE)


_, TX_SCHEMA_VALIDATOR_ELECTION = _load_schema('transaction_validator_election_' +
TX_SCHEMA_VERSION, __file__)


class ValidatorElection(Transaction):

VALIDATOR_ELECTION = 'VALIDATOR_ELECTION'
Expand Down

0 comments on commit 5adc1ca

Please sign in to comment.