Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
do luke comments
Browse files Browse the repository at this point in the history
  • Loading branch information
petabytestorage committed Oct 15, 2017
1 parent 8384a40 commit 0b81134
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/explorer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package api

import (
"encoding/hex"
"fmt"
"net/http"

Expand Down Expand Up @@ -195,15 +196,15 @@ func (api *API) buildExplorerBlock(height types.BlockHeight, block types.Block,

var hexBlock string
if hexBlockEnable {
hexBlock = fmt.Sprintf("%x", encoding.Marshal(block)[:])
hexBlock = hex.EncodeToString(encoding.Marshal(block))
}

return ExplorerBlock{
MinerPayoutIDs: mpoids,
Transactions: etxns,
RawBlock: block,
HexBlock: hexBlock,
BlockId: fmt.Sprintf("%x", encoding.Marshal(block.ID())[:]),
BlockId: hex.EncodeToString(encoding.Marshal(block.ID())),

BlockFacts: facts,
}
Expand Down

0 comments on commit 0b81134

Please sign in to comment.