mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 06:25:45 +00:00
added version gateway to the push transactions API to only allow latest versions schemes to enter the APP
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
0c6d12f6ae
commit
5734a29756
@ -92,6 +92,13 @@ class TransactionListApi(Resource):
|
||||
except ValidationError as e:
|
||||
return make_error(400, "Invalid transaction ({}): {}".format(type(e).__name__, e))
|
||||
else:
|
||||
if tx_obj.version != Transaction.VERSION:
|
||||
return make_error(
|
||||
401,
|
||||
"Invalid transaction version: The transaction is valid, \
|
||||
but this node only accepts transaction with higher \
|
||||
schema version number.",
|
||||
)
|
||||
status_code, message = planet.write_transaction(tx_obj, mode)
|
||||
|
||||
if status_code == 202:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user