Poll a node

+1 vote
Can we use Walletnotify option to act as polling node?

We need to monitor whether any data has been added to a stream & then we would call JAVA API with stream data.

Can we use Walletnotify here? If yes can you please share an e.g.
asked Jul 10, 2018 by anonymous

1 Answer

0 votes

Yes, you can certainly use walletnotify (or perhaps walletnotifynew) for this. You would do something like this in the multichain.conf file for the node:

walletnotify=/path/to/script %e %s

The script in /path/to/script would check if the first script parameter (passed by %e) represents a stream of interest, and if so, trigger the Java code, passing it the second script parameter which will contain the transaction id.

More details here:

https://www.multichain.com/developers/runtime-parameters/

answered Jul 11, 2018 by MultiChain
...