user12216: If I have a block number and a bitcoin address -> Can I list all transactions for this address with an bitcoind command? Or mutliple commands?

user54581: some pseudo-code to work with the Bitcoin-Core 0.16 (if there are simpler ways pls lmk).
suppose you all have is height and addr
hash = getblockhash(height)
block = getblock(hash)

for txid in block[‘txid’]:

  tx = getrawtransaction(txid)

  for vi in tx['vin']:
    original_tx = getrawtransaction(vi['txid'])
    for vo in original_tx['vout']:
      if vo['n'] == vi['vout'] and addr in vo['scriptPubKey']['addresses']:
        print('this tx is relevant')

  for vo in tx['vout']:
    if addr in vo['scriptPubKey']['addresses']:
      print('this tx is relevant')


12216: <p>If I have a block number and a bitcoin address -> Can I list all transactions for this address with an bitcoind command? Or mutliple commands?</p>
 54581: <p>some pseudo-code to work with the <a href="https://bitcoin.org/en/developer-reference#getrawtransaction" rel="nofollow noreferrer">Bitcoin-Core 0.16</a> (if there are simpler ways pls lmk).</p>

<p>suppose you all have is <code>height</code> and <code>addr</code></p>

<pre><code>hash = getblockhash(height)
block = getblock(hash)

for txid in block[‘txid’]:

  tx = getrawtransaction(txid)

  for vi in tx['vin']:
    original_tx = getrawtransaction(vi['txid'])
    for vo in original_tx['vout']:
      if vo['n'] == vi['vout'] and addr in vo['scriptPubKey']['addresses']:
        print('this tx is relevant')

  for vo in tx['vout']:
    if addr in vo['scriptPubKey']['addresses']:
      print('this tx is relevant')
</code></pre>
