Skip to content

Commit

Permalink
Bumped eos-go and fixed few errors in booter directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Vachon committed Aug 3, 2021
1 parent d9724ec commit 60b96ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions booter/migrator/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ func (e *exporter) Export() error {
e.logger.Debug("new section",
zap.String("section_name", string(currentSection.Name)),
zap.Uint64("row_count", currentSection.RowCount),
zap.Uint64("bytes_count", currentSection.BufferSize),
zap.Uint64("bytes_count", currentSection.Offset),
zap.Uint64("buffer_size", currentSection.BufferSize),
zap.Uint64("offset", currentSection.Offset),
)
}

Expand All @@ -106,7 +106,7 @@ func (e *exporter) Export() error {
err = reader.ProcessCurrentSection(e.processContractTable)
}

if err == eossnapshot.SectionHandlerNotFound {
if err == eossnapshot.ErrSectionHandlerNotFound {
e.logger.Warn("section handler not found",
zap.String("section_name", string(currentSection.Name)),
)
Expand All @@ -130,15 +130,15 @@ func (e *exporter) Export() error {
for accountName, account := range e.accounts {
err = e.exportAccount(accountName, account)
if err != nil {
fmt.Errorf("failed to export account %q: %w", string(accountName), err)
return fmt.Errorf("failed to export account %q: %w", string(accountName), err)
}
}

e.logger.Info("exporting table scopes")
for key, tblScope := range e.tableScopes {
err = e.exportTableScope(tblScope)
if err != nil {
fmt.Errorf("failed to export table-scope %s : %w", key, err)
return fmt.Errorf("failed to export table-scope %s : %w", key, err)
}
}
return nil
Expand Down Expand Up @@ -429,7 +429,7 @@ func (e *exporter) processTableID(obj *eossnapshot.TableIDObject) error {
func (e *exporter) processContractRow(obj *eossnapshot.KeyValueObject) error {
account, found := e.accounts[AN(e.currentTable.Code)]
if !found {
fmt.Errorf("unable to process contract row: unknown account %q", AN(e.currentTable.Code))
return fmt.Errorf("unable to process contract row: unknown account %q", AN(e.currentTable.Code))
}

tableScopeKey := tableScopeKey(e.currentTable.Code, e.currentTable.TableName, e.currentTable.Scope)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/dfuse-io/shutter v1.4.1
github.com/dfuse-io/validator v0.0.0-20200407012817-82c55c634c7a
github.com/dustin/go-humanize v1.0.0
github.com/eoscanada/eos-go v0.9.1-0.20210222170049-21697b8969f6
github.com/eoscanada/eos-go v0.9.1-0.20210802215146-d4a45e07e9b5
github.com/eoscanada/eosc v1.4.0
github.com/eoscanada/pitreos v1.1.1-0.20200721154110-fb345999fa39
github.com/francoispqt/gojay v1.2.13
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,8 @@ github.com/eoscanada/eos-go v0.9.1-0.20200506160036-5e090ae689ef/go.mod h1:exxz2
github.com/eoscanada/eos-go v0.9.1-0.20200723180508-f68c7571db82/go.mod h1:exxz2Fyjqx23FIYF1QlhhhggYZxcbZMGp2H/4h7I34Y=
github.com/eoscanada/eos-go v0.9.1-0.20210222170049-21697b8969f6 h1:ZcY0wchKkZo6eTE9SEp1EKvniE7qY02OuNSUtRG2t64=
github.com/eoscanada/eos-go v0.9.1-0.20210222170049-21697b8969f6/go.mod h1:6rqBwgLY59dZN1xqoA8SoHDal0gpNvh1L1Qa3ib8QsY=
github.com/eoscanada/eos-go v0.9.1-0.20210802215146-d4a45e07e9b5 h1:adxk5zxtAbdaCFtlSfSfBiE6tvRR/57W8AAH/XwFTac=
github.com/eoscanada/eos-go v0.9.1-0.20210802215146-d4a45e07e9b5/go.mod h1:j+tTXkGNu094KcquTwf5i6KBq4M0G9xugwf/8EZKYxQ=
github.com/eoscanada/eosc v1.4.0 h1:wqlRNjrKFwX9Y30sgJfgdNxLol2WuEstYP30wr6jyoc=
github.com/eoscanada/eosc v1.4.0/go.mod h1:0I+yYzRUTbIMgQsBjBYyNdE5idtbUMMkUQM4fN5A3P4=
github.com/eoscanada/pitreos v1.1.1-0.20200721154110-fb345999fa39 h1:JQ7Gc43VO/HJb/mNc9otItimhUi5nGKH7ZvINbidcyg=
Expand Down Expand Up @@ -1044,6 +1046,7 @@ github.com/tidwall/gjson v1.2.1/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1H
github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/gjson v1.5.0 h1:QCssIUI7J0RStkzIcI4A7O6P8rDA5wi5IPf70uqKSxg=
github.com/tidwall/gjson v1.5.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/gjson v1.6.5/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=
github.com/tidwall/gjson v1.6.7 h1:Mb1M9HZCRWEcXQ8ieJo7auYyyiSux6w9XN3AdTpxJrE=
github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
Expand Down

0 comments on commit 60b96ea

Please sign in to comment.