fix: logger + debug crash devnet

Signed-off-by: Isma <71719097+Doozers@users.noreply.github.com>
This commit is contained in:
Isma 2024-01-17 10:19:42 +01:00 committed by mortimr
parent 3eae8b2fa1
commit 49789bc6bf
2 changed files with 3 additions and 1 deletions

View file

@ -110,7 +110,7 @@ func (p *PluginEngine) Start(ctx context.Context) error {
go func(_plug *Plugin) {
defer func() {
if err := recover(); err != nil {
p.logger.Error("Plugin crashed", "error", err, "plugin", _plug.Details.Name)
p.logger.Error(fmt.Sprintf("Plugin crashed, error: %v, plugin: %s", err, _plug.Details.Name))
// logs entire trace
debug.PrintStack()
}

View file

@ -130,6 +130,7 @@ func (m *MonitoringTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint6
}
if fetchSize < size {
fmt.Println("DEVNET DEBUG: add zeros ", size, fetchSize)
data = addZeros(data, size-fetchSize)
}
@ -180,6 +181,7 @@ func (m *MonitoringTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint6
}
if fetchSize < size {
fmt.Println("DEVNET DEBUG: add zeros ", size, fetchSize)
data = addZeros(data, size-fetchSize)
}