Skip to content

Commit

Permalink
fix: genesis transaction marshaling (#96)
Browse files Browse the repository at this point in the history
* fix: genesis transaction marshalling

Signed-off-by: Norman Meier <[email protected]>

* fix: use correct marshaller in tests

Signed-off-by: Norman Meier <[email protected]>

---------

Signed-off-by: Norman Meier <[email protected]>
Co-authored-by: Miloš Živković <[email protected]>
  • Loading branch information
n0izn0iz and zivkovicmilos authored Oct 1, 2024
1 parent 1d25697 commit 124725d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) {

txs := make([]bft_types.Tx, len(genesisState.Txs))
for i, tx := range genesisState.Txs {
txs[i], err = amino.MarshalJSON(tx)
txs[i], err = amino.Marshal(tx)
if err != nil {
return nil, fmt.Errorf("unable to marshal genesis tx: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions fetch/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ func TestFetcher_Genesis(t *testing.T) {
expected := &types.TxResult{
Height: 0,
Index: i,
Tx: amino.MustMarshalJSON(txs[i]),
Tx: amino.MustMarshal(txs[i]),
Response: abci.ResponseDeliverTx{},
}
require.Equal(t, expected, tx)
Expand Down Expand Up @@ -1397,7 +1397,7 @@ func serializeTxs(t *testing.T, txs []*std.Tx) types.Txs {
serializedTxs := make(types.Txs, 0, len(txs))

for _, tx := range txs {
serializedTx, err := amino.MarshalJSON(tx)
serializedTx, err := amino.Marshal(tx)
require.NoError(t, err)

serializedTxs = append(serializedTxs, serializedTx)
Expand Down

0 comments on commit 124725d

Please sign in to comment.