Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JkLondon committed Nov 28, 2024
1 parent 5c50d11 commit 5940a0a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
39 changes: 19 additions & 20 deletions turbo/jsonrpc/eth_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,32 +491,31 @@ func (api *APIImpl) GetTransactionReceipt(ctx context.Context, txnHash common.Ha

//well, let's find amogus
println("truly blocknum is:", blockNum)
//ok, blockNumFromTxNums, err := rawdbv3.TxNums.FindBlockNum(tx, txNumMin+txnIndex)
//if err != nil {
// return nil, err
//}
//if !ok {
// println("not found in txnums")
//} else {
// println("found in txnums blocknum:", blockNumFromTxNums)
//}
//ok, blockNumFromFiles, err := rawdbv3.TxNums.FindBlockNum(tx, txNum)
//if err != nil {
// return nil, err
//}
//if !ok {
// println("not found in files")
//} else {
// println("found in files blocknum:", blockNumFromFiles)
//}
//txNum = txNumMin + txnIndex
ok, blockNumFromTxNums, err := rawdbv3.TxNums.FindBlockNum(tx, txNumMin+txnIndex)
if err != nil {
return nil, err
}
if !ok {
println("not found in txnums")
} else {
println("found in txnums blocknum:", blockNumFromTxNums)
}
ok, blockNumFromFiles, err := rawdbv3.TxNums.FindBlockNum(tx, txNum)
if err != nil {
return nil, err
}
if !ok {
println("not found in files")
} else {
println("found in files blocknum:", blockNumFromFiles)
}
txNum = txNumMin + txnIndex
receipt, err := api.getReceipt(ctx, chainConfig, tx.(kv.TemporalTx), block, int(txnIndex), txNum)
if err != nil {
return nil, fmt.Errorf("getReceipt error: %w", err)
}

return ethutils.MarshalReceipt(receipt, block.Transactions()[txnIndex], chainConfig, block.HeaderNoCopy(), txnHash, true), nil

}

// GetBlockReceipts - receipts for individual block
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (api *OtterscanAPIImpl) buildSearchResults(ctx context.Context, tx kv.Tempo
rpcTx := NewRPCTransaction(txn, block.Hash(), blockNum, uint64(txIndex), block.BaseFee())
txs = append(txs, rpcTx)

receipt, err := api.receiptsGenerator.GetReceipt(ctx, chainConfig, tx, block, txIndex, txNum+1, true)
receipt, err := api.receiptsGenerator.GetReceipt(ctx, chainConfig, tx, block, txIndex, txNum+1)
if err != nil {
return nil, nil, false, err
}
Expand Down

0 comments on commit 5940a0a

Please sign in to comment.