mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
fix sender pending txn
This commit is contained in:
parent
159651242b
commit
09c13ee3c7
1 changed files with 3 additions and 1 deletions
|
|
@ -1422,10 +1422,12 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
|||
// newRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
|
||||
func newRPCPendingTransaction(tx *types.Transaction, current *types.Header, config *params.ChainConfig) *RPCTransaction {
|
||||
var baseFee *big.Int
|
||||
blockNumber := uint64(0)
|
||||
if current != nil {
|
||||
baseFee = misc.CalcBaseFee(config, current)
|
||||
blockNumber = current.Number.Uint64()
|
||||
}
|
||||
return newRPCTransaction(tx, common.Hash{}, 0, 0, baseFee, config)
|
||||
return newRPCTransaction(tx, common.Hash{}, blockNumber, 0, baseFee, config)
|
||||
}
|
||||
|
||||
// newRPCTransactionFromBlockIndex returns a transaction that will serialize to the RPC representation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue