diff options
author | Felföldi Zsolt <zsfelfoldi@gmail.com> | 2019-05-13 19:41:10 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-05-13 19:41:10 +0800 |
commit | 40cdcf8c47ff094775aca08fd5d94051f9cf1dbb (patch) | |
tree | 3a9fc715ec501ab0fec8c81004e17477bd136f9f /light/odr.go | |
parent | f4fb1a18015d88aa7b424709aac346da59edf410 (diff) | |
download | go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar.gz go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar.bz2 go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar.lz go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar.xz go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.tar.zst go-tangerine-40cdcf8c47ff094775aca08fd5d94051f9cf1dbb.zip |
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
Diffstat (limited to 'light/odr.go')
-rw-r--r-- | light/odr.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/light/odr.go b/light/odr.go index 95f1948e7..d1185e4e0 100644 --- a/light/odr.go +++ b/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) {} |