diff --git a/src/core_write.cpp b/src/core_write.cpp
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -196,8 +196,8 @@
             in.pushKV("coinbase",
                       HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
         } else {
-            in.pushKV("txid", txin.prevout.hash.GetHex());
-            in.pushKV("vout", (int64_t)txin.prevout.n);
+            in.pushKV("txid", txin.prevout.GetTxId().GetHex());
+            in.pushKV("vout", int64_t(txin.prevout.GetN()));
             UniValue o(UniValue::VOBJ);
             o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true));
             o.pushKV("hex",