* Reorder transaction_by_hash to favour canon search * Fix build. * Slightly cleaner function. * Fix test.