@ -171,7 +171,7 @@ func (s *TxPoolAPI) Content() map[string]map[string]map[string]*RPCTransaction {
for account , txs := range pending {
for account , txs := range pending {
dump := make ( map [ string ] * RPCTransaction )
dump := make ( map [ string ] * RPCTransaction )
for _ , tx := range txs {
for _ , tx := range txs {
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = n ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = N ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
}
}
content [ "pending" ] [ account . Hex ( ) ] = dump
content [ "pending" ] [ account . Hex ( ) ] = dump
}
}
@ -179,7 +179,7 @@ func (s *TxPoolAPI) Content() map[string]map[string]map[string]*RPCTransaction {
for account , txs := range queue {
for account , txs := range queue {
dump := make ( map [ string ] * RPCTransaction )
dump := make ( map [ string ] * RPCTransaction )
for _ , tx := range txs {
for _ , tx := range txs {
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = n ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = N ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
}
}
content [ "queued" ] [ account . Hex ( ) ] = dump
content [ "queued" ] [ account . Hex ( ) ] = dump
}
}
@ -195,14 +195,14 @@ func (s *TxPoolAPI) ContentFrom(addr common.Address) map[string]map[string]*RPCT
// Build the pending transactions
// Build the pending transactions
dump := make ( map [ string ] * RPCTransaction , len ( pending ) )
dump := make ( map [ string ] * RPCTransaction , len ( pending ) )
for _ , tx := range pending {
for _ , tx := range pending {
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = n ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = N ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
}
}
content [ "pending" ] = dump
content [ "pending" ] = dump
// Build the queued transactions
// Build the queued transactions
dump = make ( map [ string ] * RPCTransaction , len ( queue ) )
dump = make ( map [ string ] * RPCTransaction , len ( queue ) )
for _ , tx := range queue {
for _ , tx := range queue {
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = n ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
dump [ fmt . Sprintf ( "%d" , tx . Nonce ( ) ) ] = N ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) )
}
}
content [ "queued" ] = dump
content [ "queued" ] = dump
@ -1344,8 +1344,8 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
return result
return result
}
}
// n ewRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
// N ewRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
func n ewRPCPendingTransaction( tx * types . Transaction , current * types . Header , config * params . ChainConfig ) * RPCTransaction {
func N ewRPCPendingTransaction( tx * types . Transaction , current * types . Header , config * params . ChainConfig ) * RPCTransaction {
var baseFee * big . Int
var baseFee * big . Int
blockNumber := uint64 ( 0 )
blockNumber := uint64 ( 0 )
if current != nil {
if current != nil {
@ -1577,7 +1577,7 @@ func (s *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common.H
}
}
// No finalized transaction, try to retrieve it from the pool
// No finalized transaction, try to retrieve it from the pool
if tx := s . b . GetPoolTransaction ( hash ) ; tx != nil {
if tx := s . b . GetPoolTransaction ( hash ) ; tx != nil {
return n ewRPCPendingTransaction( tx , s . b . CurrentHeader ( ) , s . b . ChainConfig ( ) ) , nil
return N ewRPCPendingTransaction( tx , s . b . CurrentHeader ( ) , s . b . ChainConfig ( ) ) , nil
}
}
// Transaction unknown, return as such
// Transaction unknown, return as such
@ -1847,7 +1847,7 @@ func (s *TransactionAPI) PendingTransactions() ([]*RPCTransaction, error) {
for _ , tx := range pending {
for _ , tx := range pending {
from , _ := types . Sender ( s . signer , tx )
from , _ := types . Sender ( s . signer , tx )
if _ , exists := accounts [ from ] ; exists {
if _ , exists := accounts [ from ] ; exists {
transactions = append ( transactions , n ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) ) )
transactions = append ( transactions , N ewRPCPendingTransaction( tx , curHeader , s . b . ChainConfig ( ) ) )
}
}
}
}
return transactions , nil
return transactions , nil