[tor-commits] [stem/master] Refactor payload packing into separate method