les, light: implement ODR transaction lookup by hash (#19069)
* les, light: implement ODR transaction lookup by hash * les: delete useless file * internal/ethapi: always use backend to find transaction * les, eth, internal/ethapi: renamed GetCanonicalTransaction to GetTransaction * light: add canonical header verification to GetTransaction
This commit is contained in:
committed by
Péter Szilágyi
parent
f4fb1a1801
commit
40cdcf8c47
@@ -148,6 +148,7 @@ func newTestProtocolManager(lightSync bool, blocks int, generator func(int, *cor
|
||||
}
|
||||
genesis = gspec.MustCommit(db)
|
||||
chain BlockChain
|
||||
pool txPool
|
||||
)
|
||||
if peers == nil {
|
||||
peers = newPeerSet()
|
||||
@@ -162,13 +163,14 @@ func newTestProtocolManager(lightSync bool, blocks int, generator func(int, *cor
|
||||
panic(err)
|
||||
}
|
||||
chain = blockchain
|
||||
pool = core.NewTxPool(core.DefaultTxPoolConfig, gspec.Config, blockchain)
|
||||
}
|
||||
|
||||
indexConfig := light.TestServerIndexerConfig
|
||||
if lightSync {
|
||||
indexConfig = light.TestClientIndexerConfig
|
||||
}
|
||||
pm, err := NewProtocolManager(gspec.Config, indexConfig, lightSync, NetworkId, evmux, engine, peers, chain, nil, db, odr, nil, nil, make(chan struct{}), new(sync.WaitGroup), ulcConfig)
|
||||
pm, err := NewProtocolManager(gspec.Config, indexConfig, lightSync, NetworkId, evmux, engine, peers, chain, pool, db, odr, nil, nil, make(chan struct{}), new(sync.WaitGroup), ulcConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user