Bitcoin
transaction – How to programmatically determine which Tx consumed an OutPoint

Given a specific TxId and index (OutPoint), we can see how to use Bitcoin Core’s RPC to determine the OutPoint’s spending transaction. Is it simply scanning all future blocks (including the original block) for transactions whose TxIn contains that Outpoint?
jeon:
// OutPoint
txid: a260cc34b85217c01f0f8a14d0213c9536952592f3022a0f414e7485a4b016ec n: 27
// Spending Tx
txid: 59c738932e6d039e76c7eb9da8d6e36def35ee9ed092fb678f6e469d1a160312 vout: 27
Thank you, Bayer
