diff --git a/store/iavl/store.go b/store/iavl/store.go index 2bd523194f7f..09ff361bdac0 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -281,11 +281,7 @@ func (st *Store) Export(version int64) (*iavl.Exporter, error) { if !ok || tree == nil { return nil, fmt.Errorf("iavl export failed: unable to fetch tree for version %v", version) } - export, err := tree.Export() - if err != nil { - return nil, err - } - return export, nil + return tree.Export() } // Import imports an IAVL tree at the given version, returning an iavl.Importer for importing. diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index da45c99f064a..b87bcd219015 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -779,10 +779,6 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error { for _, store := range stores { rs.logger.Debug("starting snapshot", "store", store.name, "height", height) exporter, err := store.Export(int64(height)) - if exporter == nil { - rs.logger.Error("snapshot failed; exporter is nil", "store", store.name) - return err - } if err != nil { rs.logger.Error("snapshot failed; exporter error", "store", store.name, "err", err) return err @@ -807,7 +803,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error { for { node, err := exporter.Next() if err == iavltree.ErrorExportDone { - rs.logger.Debug("Snapshot Done", "store", store.name, "nodeCount", nodeCount) + rs.logger.Debug("snapshot Done", "store", store.name, "nodeCount", nodeCount) nodeCount = 0 break } else if err != nil {