It's so annoying it hurts. I'm running wallet-rpc on testnet using the following command:

monero-wallet-rpc --daemon-host testnet.community.xmr.to --disable-rpc-login --testnet --trusted-daemon --rpc-bind-port 8885 --wallet-dir "/home/u/monero" --tx-notify "/path/to/program %s"

I'd sent some coins to my wallet using the faucet. --tx-notify has been fired! but for some unknown reasons, which may require Dumbledore's wizard skills to understand, now when calling get_transfer_by_txid with my txid I always receive "Transaction not found"

I've tried refresh, get_balance, rescan_blochchain, restarting wallet-rpc process.. Nothing works! So, RPC commands related to balance don't update even if wallet-rpc is notified by the transaction? I think it's a bug. What am I missing?

Transaction is already confirmed: https://community.xmr.to/explorer/testnet/tx/4d30019daa9b03e313bd6f27fb635cfcf4ea6078668f33766e4431b1c8930108/autorefresh

How to solve this award winning problem?

EDIT: Dumbledore may not be needed after all.

It seems the values of get_transfer_by_txid are updated if the account receipt does not have a high index ( <=3 I guess, did not test it) otherwise "account_index" param is mandatory to scan for transfer information (even though docs say it's optional, not stating clearly the reason; I thought specifying it only had better O(n)). It's still weird that --tx-notify is fired but wallet-rpc is not updating.

Let's say I have over 100 accounts on wallet. In case I receive a transaction via "--tx-notify", do you know a better solution to get transaction information than looping like an idiot via RPC calls through each account index? In pseudo code that may be:

for n < get_accounts
  if get_transfer_by_txid {txid: ..., account_index: n} == 'tx not exists'
  else return "found"
  • I think you worked it out yourself already. The notification should probably include the account number to avoid having to guess if you have multiple accounts. Feel free to request this at github.com/monero-project/monero/issues. As for the optional parameter, it's because it looks at the main account (index 0) if you don't specify any.
    – user36303
    Jun 29, 2021 at 16:08
  • Thanks! But I can't.. "An owner of this repository has limited the ability to open an issue to users that have contributed to this repository in the past. " could you do it for me please? Jun 29, 2021 at 16:50
  • Ah, I forgot about that :/ There's a persistent spammer necessitating this. Better yet though, I'll add this feature now.
    – user36303
    Jun 29, 2021 at 18:11
  • Meh, it's more complicated, since a tx may be paid to more than one account...
    – user36303
    Jun 29, 2021 at 18:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.