Skip to content

Commit

Permalink
Address draft comments in review
Browse files Browse the repository at this point in the history
  • Loading branch information
pbains committed Nov 23, 2022
1 parent 1fafec5 commit 11d3c50
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ run:
linters:
enable:
- errcheck
# Disabling linters until we get them fixed up.
disable:
- gosimple
- govet
Expand Down
6 changes: 1 addition & 5 deletions cmd/testutils/layer1_tx_spammer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,10 @@ func main() {
defer watcher.Close()
if isUsingTestAccounts {
// this function will block for finality delay blocks
err := tests.FundAccounts(eth, watcher, logger)
if err != nil {
if err := tests.FundAccounts(eth, watcher, logger); err != nil {
panic("Unable to fund test accounts")
}
tests.SetNextBlockBaseFee(eth.GetEndpoint(), 100_000_000_000)
if err != nil {
panic("Unable to fund set next block base fee")
}
}

// spawn num of Workers
Expand Down
6 changes: 2 additions & 4 deletions consensus/objs/rs.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,8 @@ func (b *RoundState) TrackExternalConflicts(v *Proposal) {
return
}
// is current
_, err := b.checkStaleAndConflict(v, false)
if err != nil {
return
}
// nolint:errcheck // review error checking for RoundState
b.checkStaleAndConflict(v, false)
}

func (b *RoundState) SetRCert(rc *RCert) error {
Expand Down
5 changes: 4 additions & 1 deletion dynamics/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestGetSetNode(t *testing.T) {
db := initializeDB()

node := &Node{}
_ = db.rawDB.Update(func(txn *badger.Txn) error {
err := db.rawDB.Update(func(txn *badger.Txn) error {
err := db.SetNode(txn, node)
if err == nil {
t.Fatal("Should have raised error (1)")
Expand Down Expand Up @@ -120,6 +120,9 @@ func TestGetSetNode(t *testing.T) {
}
return nil
})
if err != nil {
t.Fatal("unable to complete test")
}
}

func TestGetSetLinkedList(t *testing.T) {
Expand Down
5 changes: 1 addition & 4 deletions layer1/executor/task_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ func (tm *TaskManager) eventLoop() {

case taskRequest, ok := <-tm.requestChan:
if !ok {
err := tm.onError(ErrReceivedRequestClosedChan)
if err != nil {
tm.logger.Warn("task manager is closing")
}
_ = tm.onError(ErrReceivedRequestClosedChan)
return
}
if taskRequest.response == nil {
Expand Down

0 comments on commit 11d3c50

Please sign in to comment.