Add transaction type

Targets #191
Why do you lock here, but not in the other getters? (the locks should not be neccessary).