Skip to content

Commit

Permalink
Merge pull request #63 from renproject/fix/improve-filecoin-errors
Browse files Browse the repository at this point in the history
Improve Filecoin errors
  • Loading branch information
loongy authored Nov 12, 2020
2 parents a9c2e46 + 4f09bb5 commit 51e6bd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/filecoin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (p

actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef))
if err != nil {
return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr)
return pack.U256{}, fmt.Errorf("searching state for addr %v: %v", addr, err)
}

return pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil
Expand All @@ -177,7 +177,7 @@ func (client *Client) AccountBalance(ctx context.Context, addr address.Address)

actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef))
if err != nil {
return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr)
return pack.U256{}, fmt.Errorf("searching state for addr %v: %v", addr, err)
}

balance := actor.Balance.Int
Expand Down

0 comments on commit 51e6bd4

Please sign in to comment.