Skip to content

Commit

Permalink
Enable test again (#280)
Browse files Browse the repository at this point in the history
* Enable london fork in allEnabledConfig

* Move up the make-all in Makefile

* Add Makefile entry to download tests

* Fix rawdb tests

* Fix core tests

* Remove old testdata

* Enable full test

* Fix makefile

* Remove duplicate test for ci

* Fix small format issue

* Filter a couple of folders

* Fix go test
  • Loading branch information
ferranbt authored Jan 14, 2022
1 parent 4829114 commit 336b89e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ ios:

test: all
# $(GORUN) build/ci.go test
go test github.com/ethereum/go-ethereum/consensus/bor -v
go test github.com/ethereum/go-ethereum/tests/bor -v
# Skip mobile and cmd tests since they are being deprecated
go test -v $(go list ./... | grep -v go-ethereum/cmd/ | grep -v go-ethereum/mobile/)

lint: ## Run linters.
$(GORUN) build/ci.go lint
Expand Down
6 changes: 4 additions & 2 deletions core/rawdb/freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ func newFreezer(datadir string, namespace string, readonly bool, maxTableSize ui
// This way they don't have to sync again from block 0 and still be compatible
// for block logs for future blocks. Note that already synced nodes
// won't have past block logs. Newly synced node will have all the data.
if err := freezer.tables[freezerBorReceiptTable].Fill(freezer.tables[freezerHeaderTable].items); err != nil {
return nil, err
if _, ok := freezer.tables[freezerBorReceiptTable]; ok {
if err := freezer.tables[freezerBorReceiptTable].Fill(freezer.tables[freezerHeaderTable].items); err != nil {
return nil, err
}
}

// Truncate all tables to common length.
Expand Down
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context,
}

if len(txs) != len(receipts) {
return nil, fmt.Errorf("txs length doesn't equal to receipts' length", len(txs), len(receipts))
return nil, fmt.Errorf("txs length %d doesn't equal to receipts' length %d", len(txs), len(receipts))
}

txReceipts := make([]map[string]interface{}, 0, len(txs))
Expand Down
4 changes: 2 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ var (
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, new(EthashConfig), nil, nil}
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}

// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Clique consensus.
Expand All @@ -369,7 +369,7 @@ var (
// adding flags to the config to also have to set these fields.
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil}

TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, new(EthashConfig), nil, nil}
TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
TestRules = TestChainConfig.Rules(new(big.Int))
)

Expand Down
1 change: 0 additions & 1 deletion tests/testdata
Submodule testdata deleted from 092a88

0 comments on commit 336b89e

Please sign in to comment.