diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 59b82cca2..d33ee264a 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -266,7 +266,7 @@ func (bc *Blockchain) AddHeaders(headers ...*Header) (err error) { } if oldlen != headerList.Len() { - updateHeaderHeightMetric(headerList.Len()-1) + updateHeaderHeightMetric(headerList.Len() - 1) if err = bc.store.PutBatch(batch); err != nil { return }