Skip to content

Commit 14b1f29

Browse files
committed
update gas usage for hooks
1 parent 77492ed commit 14b1f29

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vmhost/contexts/managedType.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,13 @@ func (context *managedTypesContext) ManagedMapGet(mMapHandle int32, keyHandle in
786786
return err
787787
}
788788

789+
err = context.ConsumeGasForBytes(value)
790+
if err != nil {
791+
return err
792+
}
793+
789794
context.SetBytes(outValueHandle, value)
790-
return context.ConsumeGasForBytes(value)
795+
return nil
791796
}
792797

793798
// ManagedMapRemove removes the bytes stored as the key handle and returns it in an output value handle

0 commit comments

Comments
 (0)