mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 22:45:44 +00:00
removed some print
This commit is contained in:
parent
6e16a6c0f1
commit
6b78be5e56
@ -80,7 +80,7 @@ def store_transactions(connection, signed_transactions: list):
|
|||||||
metadatasxspace.insert(txtuples["metadata"])
|
metadatasxspace.insert(txtuples["metadata"])
|
||||||
|
|
||||||
if txtuples["asset"] is not None:
|
if txtuples["asset"] is not None:
|
||||||
print(f" ASSET : {txtuples['asset']}")
|
# print(f" ASSET : {txtuples['asset']}")
|
||||||
assetsxspace.insert(txtuples["asset"])
|
assetsxspace.insert(txtuples["asset"])
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ def get_transactions(connection, transactions_ids: list):
|
|||||||
def store_metadatas(connection, metadata: list):
|
def store_metadatas(connection, metadata: list):
|
||||||
space = connection.space("meta_data")
|
space = connection.space("meta_data")
|
||||||
for meta in metadata:
|
for meta in metadata:
|
||||||
print(f"METADATA : {meta}")
|
# print(f"METADATA : {meta}")
|
||||||
data = meta["data"] if not "metadata" in meta else meta["metadata"]
|
data = meta["data"] if not "metadata" in meta else meta["metadata"]
|
||||||
if data:
|
if data:
|
||||||
space.insert((meta["id"], meta["data"] if not "metadata" in meta else meta["metadata"]))
|
space.insert((meta["id"], meta["data"] if not "metadata" in meta else meta["metadata"]))
|
||||||
@ -122,7 +122,7 @@ def get_metadata(connection, transaction_ids: list):
|
|||||||
#def store_asset(connection, asset: dict, tx_id=None):
|
#def store_asset(connection, asset: dict, tx_id=None):
|
||||||
def store_asset(connection, asset: dict):
|
def store_asset(connection, asset: dict):
|
||||||
space = connection.space("assets")
|
space = connection.space("assets")
|
||||||
print(f"DATA store asset: {asset}")
|
# print(f"DATA store asset: {asset}")
|
||||||
try:
|
try:
|
||||||
space.insert( asset )
|
space.insert( asset )
|
||||||
#if tx_id is not None:
|
#if tx_id is not None:
|
||||||
@ -138,7 +138,7 @@ def store_assets(connection, assets: list):
|
|||||||
space = connection.space("assets")
|
space = connection.space("assets")
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
try:
|
try:
|
||||||
print(f"DATA store assets: {asset}")
|
# print(f"DATA store assets: {asset}")
|
||||||
space.insert( asset )
|
space.insert( asset )
|
||||||
except : # TODO Raise ERROR for Duplicate
|
except : # TODO Raise ERROR for Duplicate
|
||||||
print( f"EXCEPTION : ")
|
print( f"EXCEPTION : ")
|
||||||
|
|||||||
@ -1171,7 +1171,6 @@ class Transaction(object):
|
|||||||
"""
|
"""
|
||||||
# NOTE: Remove reference to avoid side effects
|
# NOTE: Remove reference to avoid side effects
|
||||||
# tx_body = deepcopy(tx_body)
|
# tx_body = deepcopy(tx_body)
|
||||||
print("\n\nVERIF " + str(tx_body))
|
|
||||||
tx_body = rapidjson.loads(rapidjson.dumps(tx_body))
|
tx_body = rapidjson.loads(rapidjson.dumps(tx_body))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -1180,7 +1179,6 @@ class Transaction(object):
|
|||||||
raise InvalidHash('No transaction id found!')
|
raise InvalidHash('No transaction id found!')
|
||||||
|
|
||||||
tx_body['id'] = None
|
tx_body['id'] = None
|
||||||
print(f"\n\n tx_body2: {tx_body}")
|
|
||||||
#tx_body = Transaction._remove_signatures(tx_body)
|
#tx_body = Transaction._remove_signatures(tx_body)
|
||||||
#print(f"\n\n tx_body3: {tx_body}")
|
#print(f"\n\n tx_body3: {tx_body}")
|
||||||
tx_body_serialized = Transaction._to_str(tx_body)
|
tx_body_serialized = Transaction._to_str(tx_body)
|
||||||
|
|||||||
@ -503,7 +503,6 @@ def test_cant_spend_same_input_twice_in_tx(b, alice):
|
|||||||
tx_create = Transaction.create([alice.public_key], [([alice.public_key], 100)])
|
tx_create = Transaction.create([alice.public_key], [([alice.public_key], 100)])
|
||||||
tx_create_signed = tx_create.sign([alice.private_key])
|
tx_create_signed = tx_create.sign([alice.private_key])
|
||||||
assert b.validate_transaction(tx_create_signed) == tx_create_signed
|
assert b.validate_transaction(tx_create_signed) == tx_create_signed
|
||||||
print("DCT " + str(tx_create_signed.to_dict()))
|
|
||||||
b.store_bulk_transactions([tx_create_signed])
|
b.store_bulk_transactions([tx_create_signed])
|
||||||
|
|
||||||
# Create a transfer transaction with duplicated fulfillments
|
# Create a transfer transaction with duplicated fulfillments
|
||||||
|
|||||||
@ -380,7 +380,6 @@ def test_get_spent_transaction_critical_double_spend(b, alice, bob, carol):
|
|||||||
[([bob.public_key], 1)],
|
[([bob.public_key], 1)],
|
||||||
asset_id=tx.id)\
|
asset_id=tx.id)\
|
||||||
.sign([alice.private_key])
|
.sign([alice.private_key])
|
||||||
print("SPEND " + str(tx.to_dict()))
|
|
||||||
|
|
||||||
b.store_bulk_transactions([tx])
|
b.store_bulk_transactions([tx])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user