Skip to content

Commit

Permalink
Fix log level C99 compilation and stub bindings (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat authored Apr 23, 2024
1 parent 1fa3163 commit c09f32f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const (
var ErrInterrupted = errors.New("interrupted")
var ErrInvalidBlock = errors.New("invalid block")

type SilkwormLogLevel uint8
type SilkwormLogLevel uint32

const (
LogLevelNone SilkwormLogLevel = iota
Expand Down
36 changes: 34 additions & 2 deletions bindings_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,39 @@ import (
var ErrInterrupted = errors.New("interrupted")
var ErrInvalidBlock = errors.New("invalid block")

type SilkwormLogLevel uint8
type SilkwormLogLevel uint32

const (
LogLevelNone SilkwormLogLevel = iota
LogLevelCritical
LogLevelError
LogLevelWarning
LogLevelInfo
LogLevelDebug
LogLevelTrace
)

type RpcInterfaceLogSettings struct {
Enabled bool
ContainerFolder string
MaxFileSizeMB uint16
MaxFiles uint16
DumpResponse bool
}

type RpcDaemonSettings struct {
EthLogSettings RpcInterfaceLogSettings
EthAPIHost string
EthAPIPort int
EthAPISpec []string
NumWorkers uint32
CORSDomains []string
JWTFilePath string
JSONRPCCompatibility bool
WebSocketEnabled bool
WebSocketCompression bool
HTTPCompression bool
}

type Silkworm struct {
}
Expand All @@ -29,7 +61,7 @@ func (s *Silkworm) AddSnapshot(snapshot *MappedChainSnapshot) error {
return nil
}

func (s *Silkworm) StartRpcDaemon(dbEnvCHandle unsafe.Pointer) error {
func (s *Silkworm) StartRpcDaemon(dbEnvCHandle unsafe.Pointer, settings RpcDaemonSettings) error {
return nil
}

Expand Down

0 comments on commit c09f32f

Please sign in to comment.