Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
krish-nr committed Oct 22, 2024
1 parent 29a49ec commit 9082f55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions core/txpool/blobpool/blobpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import (
"sync"
"time"

"github.com/holiman/billy"
"github.com/holiman/uint256"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
Expand All @@ -41,8 +44,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/holiman/billy"
"github.com/holiman/uint256"
)

const (
Expand Down Expand Up @@ -364,9 +365,11 @@ func (p *BlobPool) Init(gasTip uint64, head *types.Header, reserve txpool.Addres
// fully synced).
state, err := p.chain.StateAt(head.Root)
if err != nil {
log.Error("error 1.3")
state, err = p.chain.StateAt(types.EmptyRootHash)
}
if err != nil {
log.Error("error 1.4")
return err
}
p.head, p.state = head, state
Expand Down
5 changes: 4 additions & 1 deletion core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
"sync/atomic"
"time"

"github.com/holiman/uint256"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/prque"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
Expand All @@ -37,7 +39,6 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/params"
"github.com/holiman/uint256"
)

const (
Expand Down Expand Up @@ -354,9 +355,11 @@ func (pool *LegacyPool) Init(gasTip uint64, head *types.Header, reserve txpool.A
// fully synced).
statedb, err := pool.chain.StateAt(head.Root)
if err != nil {
log.Error("error 1.1")
statedb, err = pool.chain.StateAt(types.EmptyRootHash)
}
if err != nil {
log.Error("error 1.2")
return err
}
pool.currentHead.Store(head)
Expand Down

0 comments on commit 9082f55

Please sign in to comment.