Skip to content

Commit

Permalink
fix: block info
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Nov 21, 2023
1 parent 6ac804a commit 357a318
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linters:
- ineffassign
- staticcheck
- unused
- gocognit
# - gocognit
- godox
- gocritic
- gci
Expand Down
7 changes: 5 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ func (c *Client) LastBlockTime() (uint32, error) {
if err != nil {
return 0, err
}

lastBlockTime, err := c.blockchainClient.GetBlock(context.Background(), &pactus.GetBlockRequest{Height: info.LastBlockHeight})

lastBlockTime, err := c.blockchainClient.GetBlock(context.Background(), &pactus.GetBlockRequest{
Height: info.LastBlockHeight,
Verbosity: pactus.BlockVerbosity_BLOCK_INFO,
})

return lastBlockTime.BlockTime, err
}
Expand Down
2 changes: 1 addition & 1 deletion discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (b *Bot) Stop() error {

// This function will be called (due to AddHandler above) every time a new
// message is created on any channel that the authenticated bot has access to.
// nolint
// nolint.
func (b *Bot) messageHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
p := message.NewPrinter(language.English)

Expand Down

0 comments on commit 357a318

Please sign in to comment.