Remove Asset and AssetLink (#982)

* Remove asset.validate_asset and move its validation checks to other areas

* Move Asset.get_asset_id to Transaction

* Remove Asset and AssetLink models

* Add test against creating TRANSFER transactions with bad asset
This commit is contained in:
Brett Sun
2016-12-22 10:19:21 +01:00
committed by GitHub
parent 44391da94a
commit 9319583ab4
13 changed files with 322 additions and 664 deletions

View File

@@ -4,7 +4,7 @@ import json
import os
import os.path
from bigchaindb.common.transaction import Asset, Transaction
from bigchaindb.common.transaction import Transaction
TPLS = {}
@@ -62,8 +62,7 @@ def main():
""" Main function """
privkey = 'CfdqtD7sS7FgkMoGPXw55MVGGFwQLAoHYTcBhZDtF99Z'
pubkey = '4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD'
asset = Asset(None)
tx = Transaction.create([pubkey], [([pubkey], 1)], asset=asset)
tx = Transaction.create([pubkey], [([pubkey], 1)])
tx = tx.sign([privkey])
tx_json = json.dumps(tx.to_dict(), indent=2, sort_keys=True)