Bor: GetTransactionReceipt (#4209)

This commit is contained in:
Alex Sharov 2022-05-19 20:03:58 +07:00 committed by GitHub
parent ada46b0344
commit c43ae65bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,8 +255,12 @@ func (api *APIImpl) GetTransactionReceipt(ctx context.Context, hash common.Hash)
return nil, err return nil, err
} }
if chainConfig.Bor != nil { blockNum, ok, err = api.txnLookup(ctx, tx, hash)
if blockNum == 0 { if err != nil {
return nil, err
}
if !ok {
if chainConfig.Bor != nil {
var blocN uint64 var blocN uint64
borTx, blockHash, blocN, _, err = rawdb.ReadBorTransaction(tx, hash) borTx, blockHash, blocN, _, err = rawdb.ReadBorTransaction(tx, hash)
if err != nil { if err != nil {
@ -266,13 +270,7 @@ func (api *APIImpl) GetTransactionReceipt(ctx context.Context, hash common.Hash)
return nil, nil // not error, see https://github.com/ledgerwatch/erigon/issues/1645 return nil, nil // not error, see https://github.com/ledgerwatch/erigon/issues/1645
} }
blockNum = blocN blockNum = blocN
} } else {
} else {
blockNum, ok, err = api.txnLookup(ctx, tx, hash)
if err != nil {
return nil, err
}
if !ok {
return nil, nil // not error, see https://github.com/ledgerwatch/erigon/issues/1645 return nil, nil // not error, see https://github.com/ledgerwatch/erigon/issues/1645
} }
} }