I've configured bitcoind -walletnotify to run php script when callback is triggered. It works fine, but only notify until 3 confirmations are received. My goal is to notify when 6 confirmations are received for that transaction. Is there a way to configure it to notify until 6 confirmations?


The Bitcoin Core -walletnotify should only run at most twice for a typical transaction:

  1. When the transaction enters the local node's mempool

  2. When a block arrives containing that transaction.

I haven't tested this, but it looks like the code may also send a notify if the transaction is conflicted, if it is no longer confirmed after a reorg, or when it is confirmed by a different block after a reorg.

But that means you should only be notified until 1 confirmation, not 3 as you say in your question.

There is no setting that lets you choose when you get notified. However, you can build this feature for yourself using a -blocknotify command that calls one of the RPCs, such as listtransactions. Then you can check the confirmations field for each transaction and trigger an action if it's greater than or equal to 6.

You can alternatively use the listsinceblock RPC to list all transactions in the wallet that aren't part of the fifth most recently confirmed block or an earlier block. (That is, transactions that don't yet have six confirmations.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.