add ifdef in transaction.cpp