We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93c541a commit 17fab17Copy full SHA for 17fab17
core/txpool/legacypool/journal.go
@@ -131,6 +131,11 @@ func (journal *journal) insert(tx *types.Transaction) error {
131
// rotate regenerates the transaction journal based on the current contents of
132
// the transaction pool.
133
func (journal *journal) rotate(all map[common.Address]types.Transactions) error {
134
+ // No need to rotate if there are no transactions to write
135
+ if len(all) == 0 {
136
+ return nil
137
+ }
138
+
139
// Close the current journal (if any is open)
140
if journal.writer != nil {
141
if err := journal.writer.Close(); err != nil {
0 commit comments