From aa626a768d1d1c2b71edea74b1f6dfe3b49db15d Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 6 Apr 2016 11:50:46 +0200 Subject: [PATCH] fixed payload handling --- bigchaindb/util.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/bigchaindb/util.py b/bigchaindb/util.py index 4f1fe45f..a171f195 100644 --- a/bigchaindb/util.py +++ b/bigchaindb/util.py @@ -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