Allow sending a private transaction for (just) yourself
The function call will fail if privateFor is “” and does not work if privateFor is absent because I think it creates a public transaction calling a private contract.
It isn't currently possible to leave it empty (because the contents are encrypted with a senderPrivate-receiverPublic key combination, and the sender and receiver pairs can't be the same.)
Potentially, we could get around this.
Out of curiosity, how were you planning to use this private transaction? Keeping track of something?
I am developing a payment system using Quorum as a proof of concept. In this project I deploy one private smart contract for each participant on every node and keep track of the balances privately using private transactions. There is a regulator node that sets initial balance and must participate on every transaction, so it has all the updated balances and it can decide if the sender has enough money to honor any transaction. As the same smart contract is deployed on multiple nodes and they are on different states, the regulator sets some control variables privately for each contract instance on different nodes. One of these instances is on the regulators own node, so the regulator must call a function privately to set only its contract instance variable. This call is private and must not be sent to any other node.
It probably makes sense to support this in some way. You'd have to spin up another constellation node with a "throwaway" key pair right now to get around it.
Yes, that´s what I was doing before asking the question. I started a dummy node as a target to self transactions.