Skip to content

Commit

Permalink
Merge pull request ethereum#3 from flashbots/cleanup/export-session-m…
Browse files Browse the repository at this point in the history
…anager

Export api.SessionManager.
  • Loading branch information
lthibault committed Jan 22, 2024
2 parents ae2ff27 + d4817ad commit b754a25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions suave/builder/api/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ 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,
}
return api
}

type Server struct {
sessionMngr sessionManager
sessionMngr SessionManager
}

func (s *Server) NewSession(ctx context.Context) (string, error) {
Expand Down

0 comments on commit b754a25

Please sign in to comment.