File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -170,18 +170,21 @@ func (m *Manager) ExpireSession(username string) error {
170170}
171171
172172/* add transaction to a session - assumes caller holds necessary locks */
173- func (m * Manager ) AddTransaction (session * Session , txn interface {} ) error {
173+ func (m * Manager ) AddTransaction (session * Session , txn types. Transaction ) error {
174174 /* push transaction into the queue from back */
175175 session .TransactionQueue .PushBack (txn )
176176
177177 /* convert transaction to correct type and save to Redis */
178- if tx , ok := txn .(* types.Transaction ); ok {
179- if err := m .saveTransactionResultsRedis (session , * tx ); err != nil {
178+ // if tx, ok := txn.(*types.Transaction); ok {
179+
180+ // *tx was used here
181+ if err := m .saveTransactionResultsRedis (session , txn ); err != nil {
180182 return fmt .Errorf ("failed to save transaction to Redis: %w" , err )
181183 }
182- } else {
183- return fmt .Errorf ("invalid transaction type: expected *types.Transaction" )
184- }
184+
185+ // } else {
186+ // return fmt.Errorf("invalid transaction type: expected *types.Transaction")
187+ // }
185188
186189 return nil
187190}
You can’t perform that action at this time.
0 commit comments