Skip to content

Commit a45f7b2

Browse files
committed
fix quirk
1 parent 3f4e152 commit a45f7b2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

ex/lib/api/api_tx.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule API.TX do
1212
%{hash: entry_hash, header: %{slot: slot}, txs: txs} ->
1313
Enum.map(txs, fn(txu)->
1414
txu = TX.unpack(txu)
15-
|> Map.put(txu, :metadata, %{entry_hash: entry_hash, entry_slot: slot})
15+
|> Map.put(:metadata, %{entry_hash: entry_hash, entry_slot: slot})
1616
format_tx_for_client(txu)
1717
end)
1818
end

ex/lib/consensus/models/tx.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ defmodule TX do
4444
def unpack(tx_packed) do
4545
try do
4646
txu = RDB.vecpak_decode(tx_packed)
47+
txu = if !txu[:tx_encoded] do txu else
48+
Map.put(txu, :tx, VanillaSer.decode!(txu.tx_encoded))
49+
end
4750
Map.take(txu, @fields)
4851
catch
4952
_,_ ->

0 commit comments

Comments
 (0)