Skip to content

Commit

Permalink
Fix reflection callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mycodecrafting committed Apr 1, 2024
1 parent 72ca087 commit dbb333c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/vm/precompile_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ func (pm *precompileManager) Run(
defer func() { ctx.SetReadOnly(false) }()
}

results := method.reflectMethod.Func.Call(append([]reflect.Value{reflect.ValueOf(ctx)}, reflectedUnpackedArgs...))
results := method.reflectMethod.Func.Call(append(
[]reflect.Value{
reflect.ValueOf(contract),
reflect.ValueOf(ctx),
},
reflectedUnpackedArgs...,
))

// check if precompile returned an error
if len(results) > 0 {
Expand Down

0 comments on commit dbb333c

Please sign in to comment.