Allow specifying a tx-fun.
Merge bug26000