summaryrefslogtreecommitdiff
path: root/rpcs/txService.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpcs/txService.go')
-rw-r--r--rpcs/txService.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/rpcs/txService.go b/rpcs/txService.go
index 9201f96e2..df08114c6 100644
--- a/rpcs/txService.go
+++ b/rpcs/txService.go
@@ -194,11 +194,7 @@ func (txs *TxService) updateTxCache() (pendingTxGroups [][]transactions.SignedTx
// The txs.pool.PendingTxGroups() function allocates a new array on every call. That means that the old
// array ( if being used ) is still valid. There is no risk of data race here since
// the txs.pendingTxGroups is a slice (hence a pointer to the array) and not the array itself.
- pendingSignedTxGroups, _ := txs.pool.PendingTxGroups()
- txs.pendingTxGroups = make([][]transactions.SignedTxn, len(pendingSignedTxGroups))
- for i := range txs.pendingTxGroups {
- txs.pendingTxGroups[i] = pendingSignedTxGroups[i].Transactions
- }
+ txs.pendingTxGroups = txs.pool.PendingTxGroups()
txs.lastUpdate = currentUnixTime
}
return txs.pendingTxGroups