Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion consensus/bor/bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ func (c *Bor) CommitStates(
processStart := time.Now()
totalGas := 0 /// limit on gas for state sync per block
chainID := c.chainConfig.ChainID.String()
stateSyncs := make([]*types.StateSyncData, len(eventRecords))
stateSyncs := make([]*types.StateSyncData, 0, len(eventRecords))

var gasUsed uint64

Expand Down
7 changes: 3 additions & 4 deletions eth/filters/bor_api.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package filters

import (
"bytes"
"context"
"errors"

Expand All @@ -19,7 +18,7 @@ func (api *PublicFilterAPI) SetChainConfig(chainConfig *params.ChainConfig) {

func (api *PublicFilterAPI) GetBorBlockLogs(ctx context.Context, crit FilterCriteria) ([]*types.Log, error) {
if api.chainConfig == nil {
return nil, errors.New("No chain config found. Proper PublicFilterAPI initialization required")
return nil, errors.New("no chain config found. Proper PublicFilterAPI initialization required")
}

// get sprint from bor config
Expand Down Expand Up @@ -67,8 +66,8 @@ func (api *PublicFilterAPI) NewDeposits(ctx context.Context, crit ethereum.State
for {
select {
case h := <-stateSyncData:
if crit.ID == h.ID || bytes.Compare(crit.Contract.Bytes(), h.Contract.Bytes()) == 0 ||
(crit.ID == 0 && crit.Contract == common.Address{}) {
if h != nil && (crit.ID == h.ID || crit.Contract == h.Contract ||
(crit.ID == 0 && crit.Contract == common.Address{})) {
notifier.Notify(rpcSub.ID, h)
}
case <-rpcSub.Err():
Expand Down
3 changes: 2 additions & 1 deletion internal/cli/debug_pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"strings"

"google.golang.org/grpc"
empty "google.golang.org/protobuf/types/known/emptypb"

"github.com/ethereum/go-ethereum/internal/cli/flagset"
Expand Down Expand Up @@ -103,7 +104,7 @@ func (d *DebugPprofCommand) Run(args []string) int {
req.Profile = profile
}

stream, err := clt.DebugPprof(ctx, req)
stream, err := clt.DebugPprof(ctx, req, grpc.MaxCallRecvMsgSize(1024*1024*1024))

if err != nil {
return err
Expand Down