init_empty_txn() refactoring
@@ -9,7 +9,7 @@ from plenum.common.constants import TXN_TIME, TXN_TYPE, TARGET_NYM, ROLE, \
TXN_PAYLOAD_METADATA_FROM, TXN_PAYLOAD_PROTOCOL_VERSION, TXN_PAYLOAD_TYPE, TXN_METADATA_SEQ_NO, TXN_METADATA_TIME, \
TXN_METADATA_ID, TXN_VERSION, TXN_PAYLOAD_METADATA_DIGEST, TXN_ID, CURRENT_PROTOCOL_VERSION, \
TXN_PAYLOAD_METADATA_PAYLOAD_DIGEST, TXN_PAYLOAD_METADATA_TAA_ACCEPTANCE, TXN_PAYLOAD_METADATA_ENDORSER, \
- CURRENT_TXN_PAYLOAD_VERSIONS, TXN_PAYLOAD_VERSION
+ CURRENT_TXN_PAYLOAD_VERSIONS, TXN_PAYLOAD_VERSION, CURRENT_TXN_VERSION
from plenum.common.request import Request
from plenum.common.types import f, OPERATION
from stp_core.common.log import getlogger
@@ -181,7 +181,7 @@ def init_empty_txn(txn_type, protocol_version=CURRENT_PROTOCOL_VERSION):
result[TXN_PAYLOAD] = {}
result[TXN_METADATA] = {}
result[TXN_SIGNATURE] = {}
- result[TXN_VERSION] = "1"
+ result[TXN_VERSION] = CURRENT_TXN_VERSION
set_type(result, txn_type)
result[TXN_PAYLOAD][TXN_PAYLOAD_DATA] = {}
