diff --git a/Makefile b/Makefile index 9f7d0ae41b..909890d3d8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/core/rawdb/freezer.go b/core/rawdb/freezer.go index 0d4f0fa90a..e7d490c870 100644 --- a/core/rawdb/freezer.go +++ b/core/rawdb/freezer.go @@ -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. diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 999e2256cc..404d49a424 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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)) diff --git a/params/config.go b/params/config.go index c01076d28d..9175a82867 100644 --- a/params/config.go +++ b/params/config.go @@ -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. @@ -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)) ) diff --git a/tests/testdata b/tests/testdata deleted file mode 160000 index 092a8834dc..0000000000 --- a/tests/testdata +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 092a8834dc445e683103689d6f0e75a5d380a190