Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
millken committed Jun 28, 2022
1 parent f37cd25 commit f51f142
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions blockchain/filedao/filedao.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ type (

// fileDAO implements FileDAO
fileDAO struct {
lock sync.Mutex
topIndex uint64
splitHeight uint64
cfg db.Config
currFd BaseFileDAO
legacyFd FileDAO
v2Fd *FileV2Manager // a collection of v2 db files
deser *block.Deserializer
lock sync.Mutex
topIndex uint64
splitHeight uint64
cfg db.Config
currFd BaseFileDAO
legacyFd FileDAO
v2Fd *FileV2Manager // a collection of v2 db files
blockDeserializer *block.Deserializer
}
)

Expand Down Expand Up @@ -334,7 +334,7 @@ func (fd *fileDAO) addNewV2File(height uint64) error {
// create a new v2 file
cfg := fd.cfg
cfg.DbPath = kthAuxFileName(cfg.DbPath, fd.topIndex+1)
v2, err := newFileDAOv2(height, cfg, fd.deser)
v2, err := newFileDAOv2(height, cfg, fd.blockDeserializer)
if err != nil {
return err
}
Expand Down Expand Up @@ -369,7 +369,7 @@ func (fd *fileDAO) DeleteTipBlock() error {

// CreateFileDAO creates FileDAO according to master file
func CreateFileDAO(legacy bool, cfg db.Config, deser *block.Deserializer) (FileDAO, error) {
fd := fileDAO{splitHeight: 1, cfg: cfg, deser: deser}
fd := fileDAO{splitHeight: 1, cfg: cfg, blockDeserializer: deser}
fds := []*fileDAOv2{}
v2Top, v2Files := checkAuxFiles(cfg.DbPath, FileV2)
if legacy {
Expand Down

0 comments on commit f51f142

Please sign in to comment.