Post
Topic
Board Development & Technical Discussion
Re: Run Bitcoind without full sync
by
maplelake
on 08/03/2020, 00:27:30 UTC
i have tried Electrum but the protocol methods is limited. i want to make notification when there have receive transaction on my child address. if i am using Electrum or third party API, i must get transaction in every block and compare there is such address in my database, that's could have more resource if block have more than 1000+ tx. in bitcoin-cli i think that's possible using method "listtransaction" to get only latest transaction in my child address. or do you have any suggest?. Thanks for response  Grin
If you're wanting "notifications"... you should probably be using walletnotify. That will trigger the specified script to execute whenever a transaction is received (or confirms etc) that relates to your wallet (and any of the addresses in it).

Quote from: bitcoind commandline arguments
  -walletnotify=
       Execute command when a wallet transaction changes (%s in cmd is replaced
       by TxID)

As noted, you can pass in the TxID to that script by using the %s value... and you could then retrieve the information for that specific transaction using gettransaction and parse the JSON returned, instead of returning a bunch of transactions for ALL your addresses using listtransactions and trying to figure out which transaction is "new" etc.

I think it works. But not practice it.