-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds AddTransactions, AddBundle, AddBundles to the builder API #23
Conversation
suave/builder/session_manager.go
Outdated
return builder.AddTransactions(txs) | ||
} | ||
|
||
func (s *SessionManager) AddBundle(sessionId string, bundle *api.Bundle) (*api.SimulateBundleResult, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge AddBundle
with AddBundles
? That way we can reduce the scope of the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we cannot do the same with AddTransactions
because of the backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -39,8 +39,16 @@ func (nullSessionManager) AddTransaction(sessionId string, tx *types.Transaction | |||
return &SimulateTransactionResult{Logs: []*SimulatedLog{}}, nil | |||
} | |||
|
|||
func (nullSessionManager) AddBundle(sessionId string, bundle Bundle) error { | |||
return nil | |||
func (nullSessionManager) AddTransactions(sessionId string, txs types.Transactions) ([]*SimulateTransactionResult, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you call these functions in TestAPI
test? It is to make sure that both server and client encode the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did for AddTransactions
too
No description provided.