mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
fix
This commit is contained in:
parent
0b13632ae2
commit
1abfb07782
3 changed files with 17 additions and 17 deletions
|
|
@ -535,7 +535,7 @@ func (t *SizeTracker) iterateTable(closed chan struct{}, prefix []byte, name str
|
|||
iter := t.db.NewIterator(prefix, nil)
|
||||
defer iter.Release()
|
||||
|
||||
log.Info("Iterating state", "category", name)
|
||||
log.Debug("Iterating state", "category", name)
|
||||
for iter.Next() {
|
||||
count++
|
||||
bytes += int64(len(iter.Key()) + len(iter.Value()))
|
||||
|
|
@ -557,7 +557,7 @@ func (t *SizeTracker) iterateTable(closed chan struct{}, prefix []byte, name str
|
|||
log.Error("Iterator error", "category", name, "err", err)
|
||||
return 0, 0, err
|
||||
}
|
||||
log.Info("Finished state iteration", "category", name, "count", count, "size", common.StorageSize(bytes), "elapsed", common.PrettyDuration(time.Since(start)))
|
||||
log.Debug("Finished state iteration", "category", name, "count", count, "size", common.StorageSize(bytes), "elapsed", common.PrettyDuration(time.Since(start)))
|
||||
return count, bytes, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ func TestSizeTracker(t *testing.T) {
|
|||
|
||||
state.AddBalance(addr2, uint256.NewInt(2000), tracing.BalanceChangeUnspecified)
|
||||
state.SetNonce(addr2, 2, tracing.NonceChangeUnspecified)
|
||||
state.SetCode(addr2, []byte{0x60, 0x80, 0x60, 0x40, 0x52})
|
||||
state.SetCode(addr2, []byte{0x60, 0x80, 0x60, 0x40, 0x52}, tracing.CodeChangeUnspecified)
|
||||
|
||||
state.AddBalance(addr3, uint256.NewInt(3000), tracing.BalanceChangeUnspecified)
|
||||
state.SetNonce(addr3, 3, tracing.NonceChangeUnspecified)
|
||||
|
|
@ -92,7 +92,7 @@ func TestSizeTracker(t *testing.T) {
|
|||
}
|
||||
|
||||
if i%3 == 0 {
|
||||
newState.SetCode(testAddr, []byte{byte(i), 0x60, 0x80, byte(i + 1), 0x52})
|
||||
newState.SetCode(testAddr, []byte{byte(i), 0x60, 0x80, byte(i + 1), 0x52}, tracing.CodeChangeUnspecified)
|
||||
}
|
||||
|
||||
root, _, err := newState.CommitWithUpdate(blockNum, true, false)
|
||||
|
|
@ -160,7 +160,7 @@ func TestSizeTracker(t *testing.T) {
|
|||
}
|
||||
|
||||
if i%3 == 0 {
|
||||
newState.SetCode(testAddr, []byte{byte(i), 0x60, 0x80, byte(i + 1), 0x52})
|
||||
newState.SetCode(testAddr, []byte{byte(i), 0x60, 0x80, byte(i + 1), 0x52}, tracing.CodeChangeUnspecified)
|
||||
}
|
||||
|
||||
root, update, err := newState.CommitWithUpdate(blockNum, true, false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue