Skip to content

Commit

Permalink
Merge pull request #15 from kehiy/main
Browse files Browse the repository at this point in the history
fix: last blocktime logic
  • Loading branch information
kehiy authored Nov 21, 2023
2 parents 0836216 + e568025 commit 6ac804a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func (c *Client) TransactionData(hash string) (*pactus.TransactionInfo, error) {
}

func (c *Client) LastBlockTime() (uint32, error) {
info, _ := c.blockchainClient.GetBlockchainInfo(context.Background(), &pactus.GetBlockchainInfoRequest{})
info, err := c.blockchainClient.GetBlockchainInfo(context.Background(), &pactus.GetBlockchainInfoRequest{})
if err != nil {
return 0, err
}

Check failure on line 120 in client/client.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
lastBlockTime, err := c.blockchainClient.GetBlock(context.Background(), &pactus.GetBlockRequest{Height: info.LastBlockHeight})

return lastBlockTime.BlockTime, err
Expand Down

0 comments on commit 6ac804a

Please sign in to comment.