Skip to content

Commit 53ca60d

Browse files
lukepark327MetadiumRelease
authored andcommitted
add etcdCompactWindow
1 parent c440fbe commit 53ca60d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

metadium/admin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ var (
104104
ErrInvalidEnode = errors.New("invalid enode")
105105

106106
etcdCompactFrequency = int64(100)
107+
etcdCompactWindow = int64(100)
107108
)
108109

109110
func (n *metaNode) eq(m *metaNode) bool {
@@ -1094,7 +1095,7 @@ func LogBlock(height int64, hash common.Hash) {
10941095
log.Info("Metadium - logged the latest block",
10951096
"height", height, "hash", hash, "took", time.Since(tstart))
10961097

1097-
if (rev%etcdCompactFrequency == 0) && (rev > 100) {
1098+
if (rev%etcdCompactFrequency == 0) && (rev > etcdCompactWindow) {
10981099
go func() {
10991100
if err := admin.etcdCompact(rev); err != nil {
11001101
log.Error("Metadium - failed to compact",

0 commit comments

Comments
 (0)