Merge pull request #3 from flashbots/cleanup/export-session-manager

Export api.SessionManager.
This commit is contained in:
Louis Thibault 2024-01-22 22:22:07 +01:00 committed by GitHub
commit b754a25119
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,13 +6,13 @@ import (
"github.com/ethereum/go-ethereum/core/types"
)
// sessionManager is the backend that manages the session state of the builder API.
type sessionManager interface {
// SessionManager is the backend that manages the session state of the builder API.
type SessionManager interface {
NewSession() (string, error)
AddTransaction(sessionId string, tx *types.Transaction) (*types.SimulateTransactionResult, error)
}
func NewServer(s sessionManager) *Server {
func NewServer(s SessionManager) *Server {
api := &Server{
sessionMngr: s,
}
@ -20,7 +20,7 @@ func NewServer(s sessionManager) *Server {
}
type Server struct {
sessionMngr sessionManager
sessionMngr SessionManager
}
func (s *Server) NewSession(ctx context.Context) (string, error) {