0

Hi my configured jsonrpc is following

maxconnections=200
maxuploadtarget=20
rpcuser=someusername
rpcpassword=somepassword
daemon=1
keypool=10000
walletnotify=curl "https://someurl.com/walletnotify?transaction_hash=%s"
blocknotify=curl "https://someurl.com/blocknotify?transaction_hash=%s"

I am getting notified on both wallet notify and block notify but the problem is the transaction is not the same for both. For Example I get f793d590bacffce8efd37c1b1e3db254950e925dd5bbd7f3a92c1db142f4dc37 from wallet notify and

00000000000000000038ffec8f035d54558a78e94ae1138ac5bdf1470fb0863f

from block notify. Please help what have I missed or done wrong here?

3

-blocknotify notifies you about a block, not a transaction. The hash you see is a block hash You'll have to call an RPC like listtransactions or getreceivedbyaddress on payments you expect.

Alternatively, you can also call getblock with the hash you were notified about to see all the transactions in it. I don't recommend that though, as you'll need to deal with the case where your node was down or your system restarted, and you won't get notifications for things that happened during downtime.

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.