diff --git a/src/core_write.cpp b/src/core_write.cpp index 3b9d64556f..8bb7e57d7b 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -292,11 +292,11 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, entry.pushKV("mnhfTx", mnhfTx.ToJson()); } } else if (tx.nType == TRANSACTION_ASSET_LOCK) { - if (CAssetLockPayload assetLockTx; !GetTxPayload(tx, assetLockTx)) { + if (CAssetLockPayload assetLockTx; GetTxPayload(tx, assetLockTx)) { entry.pushKV("assetLockTx", assetLockTx.ToJson()); } } else if (tx.nType == TRANSACTION_ASSET_UNLOCK) { - if (CAssetUnlockPayload assetUnlockTx; !GetTxPayload(tx, assetUnlockTx)) { + if (CAssetUnlockPayload assetUnlockTx; GetTxPayload(tx, assetUnlockTx)) { entry.pushKV("assetUnlockTx", assetUnlockTx.ToJson()); } } diff --git a/test/functional/feature_asset_locks.py b/test/functional/feature_asset_locks.py index 007c71fcc7..5f831f7bc6 100755 --- a/test/functional/feature_asset_locks.py +++ b/test/functional/feature_asset_locks.py @@ -256,6 +256,7 @@ class AssetLocksTest(DashTestFramework): self.check_mempool_result(tx=asset_lock_tx, result_expected={'allowed': True}) self.validate_credit_pool_balance(0) txid_in_block = self.send_tx(asset_lock_tx) + assert "assetLockTx" in node.getrawtransaction(txid_in_block, 1) self.validate_credit_pool_balance(0) node.generate(1) assert_equal(self.get_credit_pool_balance(node=node_wallet), 0) @@ -327,7 +328,8 @@ class AssetLocksTest(DashTestFramework): assert_equal(asset_unlock_tx_payload.quorumHash, int(self.mninfo[0].node.quorum("selectquorum", llmq_type_test, 'e6c7a809d79f78ea85b72d5df7e9bd592aecf151e679d6e976b74f053a7f9056')["quorumHash"], 16)) - self.send_tx(asset_unlock_tx) + txid = self.send_tx(asset_unlock_tx) + assert "assetUnlockTx" in node.getrawtransaction(txid, 1) self.mempool_size += 1 self.check_mempool_size() self.validate_credit_pool_balance(locked_1)