Skip to content

Commit

Permalink
pkg/morph/client: make endianness clearer in logs code
Browse files Browse the repository at this point in the history
`Reverse` explains it worse that explicit `LE`.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Aug 7, 2024
1 parent d9d0613 commit 857dbd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/morph/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string,
c.logger.Debug("neo client invoke",
zap.String("method", method),
zap.Uint32("vub", vub),
zap.Stringer("tx_hash", txHash.Reverse()))
zap.String("tx_hash", txHash.StringLE()))

Check warning on line 346 in pkg/morph/client/client.go

View check run for this annotation

Codecov / codecov/patch

pkg/morph/client/client.go#L346

Added line #L346 was not covered by tests

return nil
}
Expand Down Expand Up @@ -434,7 +434,7 @@ func (c *Client) TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error

c.logger.Debug("native gas transfer invoke",
zap.String("to", receiver.StringLE()),
zap.Stringer("tx_hash", txHash.Reverse()),
zap.String("tx_hash", txHash.StringLE()),

Check warning on line 437 in pkg/morph/client/client.go

View check run for this annotation

Codecov / codecov/patch

pkg/morph/client/client.go#L437

Added line #L437 was not covered by tests
zap.Uint32("vub", vub))

return nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/morph/client/notary.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ func (c *Client) depositNotary(amount fixedn.Fixed8, till int64) error {

_, err = c.rpcActor.WaitSuccess(txHash, vub, nil)
if err != nil {
return fmt.Errorf("waiting for %s TX (%d vub) to be persisted: %w", txHash.Reverse(), vub, err)
return fmt.Errorf("waiting for %s TX (%d vub) to be persisted: %w", txHash.StringLE(), vub, err)

Check warning on line 218 in pkg/morph/client/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/morph/client/notary.go#L216-L218

Added lines #L216 - L218 were not covered by tests
}

c.logger.Debug("notary deposit invoke",
zap.Int64("amount", int64(amount)),
zap.Int64("expire_at", till),
zap.Uint32("vub", vub),
zap.Stringer("tx_hash", txHash.Reverse()))
zap.String("tx_hash", txHash.StringLE()))

Check warning on line 225 in pkg/morph/client/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/morph/client/notary.go#L225

Added line #L225 was not covered by tests

return nil

Check warning on line 227 in pkg/morph/client/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/morph/client/notary.go#L227

Added line #L227 was not covered by tests
}
Expand Down

0 comments on commit 857dbd8

Please sign in to comment.