I wrote a smart contract and deployed on my private Quorum. I use Web3j to generate java wrapper to call ABIs. For example,
// here is a smart contract function
function getMoney() external payable
{
Event_GotMoney(msg.value, now);
}
In my java, if I call like this
contract.getMoney(new BigInteger(100)).send();
// or
// contract.getMoney(new BigInteger(100));
I can always get Event_GotMoney event. However, if I want to call it continuously, like this, (asynchronized)
for(int i=0; i<100; i++)
contract.getMoney(new BigInteger(100));
I can't get 100 Event_GotMoney events. The interval of the timestamp in the event is 3 or 10 seconds(depends on the frequency of generating blocks). I guess the nonce isn't updated util a block generated. If my guess is correct, how can I call smart contract functions continuously? If not, is it a limitation or something?
Another small question, I use event observable functions provided by Web3j wrapper. It works well to get events, but it updates every 15 seconds. How could I modify the interval?
Any feedback would be appreciate.