mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
dump witness sizes instead of loggin them to disk
This commit is contained in:
parent
9d172df8bb
commit
4fc9f889ad
2 changed files with 3 additions and 8 deletions
|
|
@ -1852,7 +1852,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
|
|||
} else {
|
||||
status, err = bc.writeBlockAndSetHead(block, receipts, logs, statedb, false)
|
||||
}
|
||||
|
||||
statedb.GetWitness().SetBlock(block)
|
||||
log.Info(fmt.Sprintf("block %d summary:\n%s", block.NumberU64(), statedb.GetWitness().Summary()))
|
||||
//state.DumpBlockWithWitnessToFile(statedb.GetWitness(), block)
|
||||
|
|
|
|||
|
|
@ -161,13 +161,9 @@ func (w Witness) Copy() Witness {
|
|||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (w *Witness) Dump() {
|
||||
for owner, al := range w.lists {
|
||||
fmt.Printf("owner %x:\n", owner)
|
||||
for path, node := range al {
|
||||
fmt.Printf("%x: %x\n", []byte(path), node)
|
||||
}
|
||||
}
|
||||
func (w *Witness) LogSizeWithBlock(b *types.Block) {
|
||||
enc := w.EncodeRLP()
|
||||
fmt.Printf("block %d witness+block size: %d\n", b.Number(), len(enc))
|
||||
}
|
||||
|
||||
func (w *Witness) Summary() string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue