relocate export_history code
handle coinbase transactions explicitly