1

I've successfully configured bitcoind and walletnotify to run on every deposit transaction in testnet. The problem is walletnotify hits only when a transaction gets its first confirmation and nothing happens when the transaction has been just created and has 0 confirmations.

Here is my bitcoin.conf

blocksonly=1
daemon=1
maxconnections=20
maxuploadtarget=500
testnet=1
rpcuser=someuser
rpcpassword=somepassword
server=1
keypool=1000
walletnotify=/home/ubuntu/walletnotify.sh %s

And this is content of walletnotify.sh

#!/bin/bash
F=/home/ubuntu/wallet_transaction_log
D=`date +"%Y%m%d%H%M%S"`
echo ${D} - ${1} >> ${F}

which simply writes DateTime and txid of each transaction in wallet_transaction_log

wallet_transaction_log

20201111135218 - d0cafe97f46ae3f8fb0bda6234a5c7a54ecb7053da10d9c393e261e0f6ab8295
20201111135921 - dfdd50db6e4508a4221ab144d8b33d77620d324d2a4667b64882e0a608b2bf80

is there something I'm missing?

1

You are in blocks only mode as you have blocksonly=1 set in your bitcoin.conf. This means that your node will not receive or relay unconfirmed transactions. You only see blocks and the transactions that come in blocks. Thus the first time your node will see an incoming transaction is when it is first included in a block.

1
  • That's right! Thank you so much
    – RezTaj
    Nov 11 '20 at 20:55

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.