[txnId_Fix] Add txn_id while metadata appending (if exist)
@@ -7,7 +7,7 @@ from plenum.common.constants import TXN_TIME, TXN_TYPE, TARGET_NYM, ROLE, \
ALIAS, VERKEY, FORCE, TXN_PAYLOAD, TXN_PAYLOAD_METADATA, TXN_SIGNATURE, TXN_METADATA, TXN_SIGNATURE_TYPE, ED25515, \
TXN_SIGNATURE_FROM, TXN_SIGNATURE_VALUE, TXN_SIGNATURE_VALUES, TXN_PAYLOAD_DATA, TXN_PAYLOAD_METADATA_REQ_ID, \
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_METADATA_ID, TXN_VERSION, TXN_PAYLOAD_METADATA_DIGEST, TXN_ID
from plenum.common.request import Request
from plenum.common.types import f, OPERATION
from stp_core.common.log import getlogger
@@ -230,7 +230,10 @@ def transform_to_new_format(txn, seq_no):
txn_time = t.pop(TXN_TIME, None)
txn = do_req_to_txn(req_data=t,
req_op=t)
- append_txn_metadata(txn, seq_no=seq_no, txn_time=txn_time)
+ append_txn_metadata(txn,
+ seq_no=seq_no,
+ txn_time=txn_time,
+ txn_id=t.get(TXN_ID, None))
return txn
