debug validator traces

This commit is contained in:
HAOYUatHZ 2023-09-18 16:37:58 +08:00
parent 93a9497d75
commit 5485833255
No known key found for this signature in database

View file

@ -17,6 +17,7 @@
package core
import (
"encoding/json"
"errors"
"fmt"
"sync"
@ -293,6 +294,18 @@ func (v *BlockValidator) validateCircuitRowConsumption(block *types.Block) (*typ
return nil, err
}
bTraces, err := json.Marshal(traces)
if err != nil {
return nil, err
}
log.Debug("Validator get block traces",
"id", v.circuitCapacityChecker.ID,
"block number", block.NumberU64(),
"block hash", block.Hash().Hex(),
"traces", string(bTraces),
)
v.cMu.Lock()
defer v.cMu.Unlock()