Skip to content

Commit 21ce0e3

Browse files
authored
Merge pull request #3 from CortexFoundation/dev
value quo
2 parents d3a2cdf + 4a02cb6 commit 21ce0e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

monitor.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ import (
2424
"github.com/CortexFoundation/CortexTheseus/common/mclock"
2525
"github.com/CortexFoundation/CortexTheseus/log"
2626
"github.com/CortexFoundation/CortexTheseus/metrics"
27+
params1 "github.com/CortexFoundation/CortexTheseus/params"
2728
"github.com/CortexFoundation/CortexTheseus/rpc"
2829
"github.com/CortexFoundation/robot/backend"
2930
"github.com/CortexFoundation/torrentfs/params"
3031
"github.com/CortexFoundation/torrentfs/types"
3132
lru "github.com/hashicorp/golang-lru"
3233
"math"
34+
"math/big"
3335
"runtime"
3436
"strconv"
3537
"sync"
@@ -853,7 +855,8 @@ func (m *Monitor) forPrintService(block *types.Block) error {
853855
log.Info("Block print", "num", block.Number, "hash", block.Hash, "txs", len(block.Txs))
854856
if len(block.Txs) > 0 {
855857
for _, t := range block.Txs {
856-
log.Info("Tx print", "hash", t.Hash, "amount", t.Amount, "gas", t.GasLimit, "receipt", t.Recipient, "payload", t.Payload)
858+
x := new(big.Float).Quo(new(big.Float).SetInt(t.Amount), new(big.Float).SetInt(big.NewInt(params1.Cortex)))
859+
log.Info("Tx print", "hash", t.Hash, "amount", x, "gas", t.GasLimit, "receipt", t.Recipient, "payload", t.Payload)
857860
}
858861
}
859862
m.fs.Anchor(block.Number)

0 commit comments

Comments
 (0)