I'm using tx-notify with the monero-wallet-rpc and am having issues understanding the logic behind when tx-notify is triggered.
Right now from what I've experienced so far, tx-notify is triggered twice per transaction.
Once, upon tx being in a pending state (which I think means it's in the mem_pool)
Twice, upon tx being added to a block
I've also noticed that if I stop the monero-wallet-rpc, send a transaction, then start the monero-wallet-rpc a while later; tx-notify will still trigger twice even though the tx already has several confirmations.
I've looked at the code for tx-notify. I only see tx-notify being called once on line 2451. C is foreign to me, so can someone explain to me what the logic behind when tx-notify is triggered and why it's triggered twice?