Skip to content

Commit 2069123

Browse files
lukepark327MetadiumRelease
authored andcommitted
feat: apply compact window && update check logic
* apply concept of compact window * update check logic
1 parent 53ca60d commit 2069123

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metadium/admin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,9 +1095,9 @@ func LogBlock(height int64, hash common.Hash) {
10951095
log.Info("Metadium - logged the latest block",
10961096
"height", height, "hash", hash, "took", time.Since(tstart))
10971097

1098-
if (rev%etcdCompactFrequency == 0) && (rev > etcdCompactWindow) {
1098+
if ((rev%etcdCompactFrequency == 0) && (rev > etcdCompactFrequency)) && (rev > etcdCompactWindow) {
10991099
go func() {
1100-
if err := admin.etcdCompact(rev); err != nil {
1100+
if err := admin.etcdCompact(rev - etcdCompactWindow + 1); err != nil {
11011101
log.Error("Metadium - failed to compact",
11021102
"rev", rev, "took", time.Since(tstart))
11031103
}

0 commit comments

Comments
 (0)