mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
fixed payload handling
This commit is contained in:
parent
dd3bc54c62
commit
aa626a768d
@ -76,6 +76,7 @@ def timestamp():
|
||||
return "{0:.6f}".format(time.mktime(dt.timetuple()) + dt.microsecond / 1e6)
|
||||
|
||||
|
||||
# TODO: Consider remove the operation (if there are no inputs CREATE else TRANSFER)
|
||||
def create_tx(current_owners, new_owners, inputs, operation, payload=None):
|
||||
"""Create a new transaction
|
||||
|
||||
@ -92,8 +93,8 @@ def create_tx(current_owners, new_owners, inputs, operation, payload=None):
|
||||
`TRANSFER` - A transfer operation allows for a transfer of the digital assets between entities.
|
||||
|
||||
Args:
|
||||
current_owner (str): base58 encoded public key of the current owner of the asset.
|
||||
new_owner (str): base58 encoded public key of the new owner of the digital asset.
|
||||
current_owners (list): base58 encoded public key of the current owners of the asset.
|
||||
new_owners (list): base58 encoded public key of the new owners of the digital asset.
|
||||
inputs (list): id of the transaction to use as input.
|
||||
operation (str): Either `CREATE` or `TRANSFER` operation.
|
||||
payload (Optional[dict]): dictionary with information about asset.
|
||||
@ -154,12 +155,6 @@ def create_tx(current_owners, new_owners, inputs, operation, payload=None):
|
||||
else:
|
||||
raise TypeError('`payload` must be an dict instance')
|
||||
|
||||
hash_payload = hash_data(serialize(payload))
|
||||
data = {
|
||||
'hash': hash_payload,
|
||||
'payload': payload
|
||||
}
|
||||
|
||||
# handle inputs
|
||||
fulfillments = []
|
||||
# transfer
|
||||
|
Loading…
x
Reference in New Issue
Block a user