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
17
light/odr.go
17
light/odr.go
@ -175,3 +175,20 @@ func (req *BloomRequest) StoreResult(db ethdb.Database) {
|
||||
rawdb.WriteBloomBits(db, req.BitIdx, sectionIdx, sectionHead, req.BloomBits[i])
|
||||
}
|
||||
}
|
||||
|
||||
// TxStatus describes the status of a transaction
|
||||
type TxStatus struct {
|
||||
Status core.TxStatus
|
||||
Lookup *rawdb.LegacyTxLookupEntry `rlp:"nil"`
|
||||
Error string
|
||||
}
|
||||
|
||||
// TxStatusRequest is the ODR request type for retrieving transaction status
|
||||
type TxStatusRequest struct {
|
||||
OdrRequest
|
||||
Hashes []common.Hash
|
||||
Status []TxStatus
|
||||
}
|
||||
|
||||
// StoreResult stores the retrieved data in local database
|
||||
func (req *TxStatusRequest) StoreResult(db ethdb.Database) {}
|
||||
|
Reference in New Issue
Block a user