@@ -1600,9 +1600,13 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
16001600 }
16011601 receipt := receipts [index ]
16021602
1603+ return ToTransactionReceipt (ctx , s .b , tx , receipt , blockHash , hash , blockNumber , index )
1604+ }
1605+
1606+ func ToTransactionReceipt (ctx context.Context , b Backend , tx * types.Transaction , receipt * types.Receipt , blockHash common.Hash , hash common.Hash , blockNumber uint64 , index uint64 ) (map [string ]interface {}, error ) {
16031607 // Derive the sender.
16041608 bigblock := new (big.Int ).SetUint64 (blockNumber )
1605- signer := types .MakeSigner (s . b .ChainConfig (), bigblock )
1609+ signer := types .MakeSigner (b .ChainConfig (), bigblock )
16061610 from , _ := types .Sender (signer , tx )
16071611
16081612 fields := map [string ]interface {}{
@@ -1620,10 +1624,10 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
16201624 "type" : hexutil .Uint (tx .Type ()),
16211625 }
16221626 // Assign the effective gas price paid
1623- if ! s . b .ChainConfig ().IsLondon (bigblock ) {
1627+ if ! b .ChainConfig ().IsLondon (bigblock ) {
16241628 fields ["effectiveGasPrice" ] = hexutil .Uint64 (tx .GasPrice ().Uint64 ())
16251629 } else {
1626- header , err := s . b .HeaderByHash (ctx , blockHash )
1630+ header , err := b .HeaderByHash (ctx , blockHash )
16271631 if err != nil {
16281632 return nil , err
16291633 }
0 commit comments