mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Merge pull request #3 from flashbots/cleanup/export-session-manager
Export api.SessionManager.
This commit is contained in:
commit
b754a25119
1 changed files with 4 additions and 4 deletions
|
|
@ -6,13 +6,13 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sessionManager is the backend that manages the session state of the builder API.
|
// SessionManager is the backend that manages the session state of the builder API.
|
||||||
type sessionManager interface {
|
type SessionManager interface {
|
||||||
NewSession() (string, error)
|
NewSession() (string, error)
|
||||||
AddTransaction(sessionId string, tx *types.Transaction) (*types.SimulateTransactionResult, error)
|
AddTransaction(sessionId string, tx *types.Transaction) (*types.SimulateTransactionResult, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(s sessionManager) *Server {
|
func NewServer(s SessionManager) *Server {
|
||||||
api := &Server{
|
api := &Server{
|
||||||
sessionMngr: s,
|
sessionMngr: s,
|
||||||
}
|
}
|
||||||
|
|
@ -20,7 +20,7 @@ func NewServer(s sessionManager) *Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
sessionMngr sessionManager
|
sessionMngr SessionManager
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) NewSession(ctx context.Context) (string, error) {
|
func (s *Server) NewSession(ctx context.Context) (string, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue