mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
rename validate_structure to validate_id
This commit is contained in:
parent
a09af2455d
commit
294afa123f
@ -1009,7 +1009,7 @@ class Transaction(object):
|
|||||||
return asset_ids.pop()
|
return asset_ids.pop()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def validate_structure(tx_body):
|
def validate_id(tx_body):
|
||||||
"""Validate the transaction ID of a transaction
|
"""Validate the transaction ID of a transaction
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1041,7 +1041,7 @@ class Transaction(object):
|
|||||||
Returns:
|
Returns:
|
||||||
:class:`~bigchaindb.common.transaction.Transaction`
|
:class:`~bigchaindb.common.transaction.Transaction`
|
||||||
"""
|
"""
|
||||||
cls.validate_structure(tx)
|
cls.validate_id(tx)
|
||||||
inputs = [Input.from_dict(input_) for input_ in tx['inputs']]
|
inputs = [Input.from_dict(input_) for input_ in tx['inputs']]
|
||||||
outputs = [Output.from_dict(output) for output in tx['outputs']]
|
outputs = [Output.from_dict(output) for output in tx['outputs']]
|
||||||
return cls(tx['operation'], tx['asset'], inputs, outputs,
|
return cls(tx['operation'], tx['asset'], inputs, outputs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user