small fix of miss-type in ih stage (#697)

This commit is contained in:
Alex Sharov 2020-06-30 11:44:41 +07:00 committed by GitHub
parent a7f5b1ca08
commit e28e455b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -1618,7 +1618,7 @@ func regenerate(chaindata string) error {
if err := collector.Collect(k, nil); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
if err := stateSizeCollector.Collect(common.CopyBytes(k), nil); err != nil {
return err
}
@ -1628,7 +1628,7 @@ func regenerate(chaindata string) error {
if err := collector.Collect(k, common.CopyBytes(hash)); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
lenBytes := make([]byte, 8)
binary.BigEndian.PutUint64(lenBytes, stateSize)
if err := stateSizeCollector.Collect(common.CopyBytes(k), lenBytes); err != nil {

View File

@ -453,7 +453,7 @@ func incrementIntermediateHashes(s *StageState, db ethdb.Database, from, to uint
if err := collector.Collect(k, nil); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
if err := stateSizeCollector.Collect(common.CopyBytes(k), nil); err != nil {
return err
}
@ -463,7 +463,7 @@ func incrementIntermediateHashes(s *StageState, db ethdb.Database, from, to uint
if err := collector.Collect(k, common.CopyBytes(hash)); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
lenBytes := make([]byte, 8)
binary.BigEndian.PutUint64(lenBytes, stateSize)
if err := stateSizeCollector.Collect(common.CopyBytes(k), lenBytes); err != nil {
@ -552,7 +552,7 @@ func unwindIntermediateHashesStageImpl(u *UnwindState, s *StageState, db ethdb.D
if err := collector.Collect(k, nil); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
if err := stateSizeCollector.Collect(common.CopyBytes(k), nil); err != nil {
return err
}
@ -562,7 +562,7 @@ func unwindIntermediateHashesStageImpl(u *UnwindState, s *StageState, db ethdb.D
if err := collector.Collect(k, common.CopyBytes(hash)); err != nil {
return err
}
if !debug.IsTrackWitnessSizeEnabled() {
if debug.IsTrackWitnessSizeEnabled() {
lenBytes := make([]byte, 8)
binary.BigEndian.PutUint64(lenBytes, stateSize)
if err := stateSizeCollector.Collect(common.CopyBytes(k), lenBytes); err != nil {