Skip to content

Commit

Permalink
Merge pull request #2515 from ledgerwatch/stable-2021-08-02
Browse files Browse the repository at this point in the history
Stable 2021 08 02
  • Loading branch information
mandrigin authored Aug 12, 2021
2 parents 7dc669e + 7f3ad61 commit 155186a
Show file tree
Hide file tree
Showing 123 changed files with 2,703 additions and 7,198 deletions.
12 changes: 6 additions & 6 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ var (
// ChainReader, ChainStateReader, ContractBackend, ContractCaller, ContractFilterer, ContractTransactor,
// DeployBackend, GasEstimator, GasPricer, LogFilterer, PendingContractCaller, TransactionReader, and TransactionSender
type SimulatedBackend struct {
m *stages.MockSentry
getHeader func(hash common.Hash, number uint64) *types.Header
checkTEVM func(common.Hash) (bool, error)
m *stages.MockSentry
getHeader func(hash common.Hash, number uint64) *types.Header
contractHasTEVM func(common.Hash) (bool, error)

mu sync.Mutex
prependBlock *types.Block
Expand Down Expand Up @@ -105,7 +105,7 @@ func NewSimulatedBackendWithConfig(alloc core.GenesisAlloc, config *params.Chain
return h
},
}
backend.checkTEVM = ethdb.GetCheckTEVM(olddb.NewObjectDatabase(m.DB))
backend.contractHasTEVM = ethdb.GetHasTEVM(olddb.NewObjectDatabase(m.DB))
backend.events = filters.NewEventSystem(&filterBackend{m.DB, backend})
backend.emptyPendingBlock()
return backend
Expand Down Expand Up @@ -654,7 +654,7 @@ func (b *SimulatedBackend) callContract(_ context.Context, call ethereum.CallMsg
msg := callMsg{call}

txContext := core.NewEVMTxContext(msg)
evmContext := core.NewEVMBlockContext(block.Header(), b.getHeader, b.m.Engine, nil, b.checkTEVM)
evmContext := core.NewEVMBlockContext(block.Header(), b.getHeader, b.m.Engine, nil, b.contractHasTEVM)
// Create a new environment which holds all relevant information
// about the transaction and calling mechanisms.
vmEnv := vm.NewEVM(evmContext, txContext, statedb, b.m.ChainConfig, vm.Config{})
Expand Down Expand Up @@ -687,7 +687,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx types.Transac
&b.pendingHeader.Coinbase, b.gasPool,
b.pendingState, state.NewNoopWriter(),
b.pendingHeader, tx,
&b.pendingHeader.GasUsed, vm.Config{}, b.checkTEVM); err != nil {
&b.pendingHeader.GasUsed, vm.Config{}, b.contractHasTEVM); err != nil {
return err
}
//fmt.Printf("==== Start producing block %d\n", (b.prependBlock.NumberU64() + 1))
Expand Down
17 changes: 8 additions & 9 deletions cmd/cons/commands/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
//grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/holiman/uint256"
"github.com/ledgerwatch/erigon-lib/gointerfaces"
proto_cons "github.com/ledgerwatch/erigon-lib/gointerfaces/consensus"
Expand All @@ -25,7 +25,6 @@ import (
"github.com/ledgerwatch/erigon/consensus/clique"
"github.com/ledgerwatch/erigon/core"
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/metrics"
"github.com/ledgerwatch/erigon/params"
"github.com/ledgerwatch/log/v3"
"github.com/pelletier/go-toml"
Expand Down Expand Up @@ -109,10 +108,10 @@ func grpcCliqueServer(ctx context.Context, testServer bool) (*CliqueServerImpl,
streamInterceptors []grpc.StreamServerInterceptor
unaryInterceptors []grpc.UnaryServerInterceptor
)
if metrics.Enabled {
streamInterceptors = append(streamInterceptors, grpc_prometheus.StreamServerInterceptor)
unaryInterceptors = append(unaryInterceptors, grpc_prometheus.UnaryServerInterceptor)
}
//if metrics.Enabled {
//streamInterceptors = append(streamInterceptors, grpc_prometheus.StreamServerInterceptor)
//unaryInterceptors = append(unaryInterceptors, grpc_prometheus.UnaryServerInterceptor)
//}
streamInterceptors = append(streamInterceptors, grpc_recovery.StreamServerInterceptor())
unaryInterceptors = append(unaryInterceptors, grpc_recovery.UnaryServerInterceptor())
var grpcServer *grpc.Server
Expand All @@ -135,9 +134,9 @@ func grpcCliqueServer(ctx context.Context, testServer bool) (*CliqueServerImpl,
if testServer {
proto_cons.RegisterTestServer(grpcServer, cliqueServer)
}
if metrics.Enabled {
grpc_prometheus.Register(grpcServer)
}
//if metrics.Enabled {
// grpc_prometheus.Register(grpcServer)
//}
go func() {
if err1 := grpcServer.Serve(lis); err1 != nil {
log.Error("Clique server fail", "err", err1)
Expand Down
117 changes: 0 additions & 117 deletions cmd/devp2p/README.md

This file was deleted.

158 changes: 0 additions & 158 deletions cmd/devp2p/crawl.go

This file was deleted.

Loading

0 comments on commit 155186a

Please sign in to comment.