fix the timestamp

pull/166/head
Minh Doan 6 years ago committed by Minh Doan
parent e3e3ec04bb
commit 818436a069
  1. 2
      services/explorer/service.go
  2. 2
      services/explorer/storage.go

@ -148,7 +148,7 @@ func GetTransaction(tx *types.Transaction, accountBlock *types.Block) Transactio
}
return Transaction{
ID: tx.Hash().Hex(),
Timestamp: strconv.Itoa(int(accountBlock.Size())),
Timestamp: strconv.Itoa(int(accountBlock.Time().Int64())),
From: tx.To().Hex(),
To: tx.To().Hex(),
Value: strconv.Itoa(int(tx.GasPrice().Int64())),

@ -90,7 +90,7 @@ func (storage *Storage) Dump(accountBlock []byte, height uint32) {
blockInfo := BlockInfo{
ID: block.Hash().Hex(),
Height: string(height),
Timestamp: string(block.Time().Int64()),
Timestamp: strconv.Itoa(int(block.Time().Int64())),
TXCount: string(block.Transactions().Len()),
Size: block.Size().String(),
}

Loading…
Cancel
Save