@typeberry/lib 0.0.1-6b496a1 → 0.0.1-886997c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -7
- package/index.js +1 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16320,12 +16320,6 @@ declare class Interpreter {
|
|
|
16320
16320
|
}
|
|
16321
16321
|
|
|
16322
16322
|
if (this.instructionResult.status !== null) {
|
|
16323
|
-
// All abnormal terminations should be interpreted as TRAP and we should subtract the gas. In case of FAULT we have to do it manually at the very end.
|
|
16324
|
-
if (this.instructionResult.status === Result.FAULT || this.instructionResult.status === Result.FAULT_ACCESS) {
|
|
16325
|
-
// TODO [ToDr] underflow?
|
|
16326
|
-
this.gas.sub(instructionGasMap[Instruction.TRAP]);
|
|
16327
|
-
}
|
|
16328
|
-
|
|
16329
16323
|
switch (this.instructionResult.status) {
|
|
16330
16324
|
case Result.FAULT:
|
|
16331
16325
|
this.status = Status.FAULT;
|
|
@@ -16684,7 +16678,7 @@ declare class HostCalls {
|
|
|
16684
16678
|
this.hostCalls.traceHostCall("Invoking", index, hostCall, regs, gasBefore);
|
|
16685
16679
|
const result = await hostCall.execute(gas, regs, memory);
|
|
16686
16680
|
this.hostCalls.traceHostCall(
|
|
16687
|
-
result === undefined ? "Result" : `Status(${result})`,
|
|
16681
|
+
result === undefined ? "Result" : `Status(${PvmExecution[result]})`,
|
|
16688
16682
|
index,
|
|
16689
16683
|
hostCall,
|
|
16690
16684
|
regs,
|
package/index.js
CHANGED
|
@@ -15987,11 +15987,6 @@ class Interpreter {
|
|
|
15987
15987
|
}
|
|
15988
15988
|
}
|
|
15989
15989
|
if (this.instructionResult.status !== null) {
|
|
15990
|
-
// All abnormal terminations should be interpreted as TRAP and we should subtract the gas. In case of FAULT we have to do it manually at the very end.
|
|
15991
|
-
if (this.instructionResult.status === Result.FAULT || this.instructionResult.status === Result.FAULT_ACCESS) {
|
|
15992
|
-
// TODO [ToDr] underflow?
|
|
15993
|
-
this.gas.sub(instructionGasMap[Instruction.TRAP]);
|
|
15994
|
-
}
|
|
15995
15990
|
switch (this.instructionResult.status) {
|
|
15996
15991
|
case Result.FAULT:
|
|
15997
15992
|
this.status = Status.FAULT;
|
|
@@ -16435,7 +16430,7 @@ class HostCalls {
|
|
|
16435
16430
|
}
|
|
16436
16431
|
this.hostCalls.traceHostCall("Invoking", index, hostCall, regs, gasBefore);
|
|
16437
16432
|
const result = await hostCall.execute(gas, regs, memory);
|
|
16438
|
-
this.hostCalls.traceHostCall(result === undefined ? "Result" : `Status(${result})`, index, hostCall, regs, gas.get());
|
|
16433
|
+
this.hostCalls.traceHostCall(result === undefined ? "Result" : `Status(${PvmExecution[result]})`, index, hostCall, regs, gas.get());
|
|
16439
16434
|
if (result === PvmExecution.Halt) {
|
|
16440
16435
|
status = Status.HALT;
|
|
16441
16436
|
return this.getReturnValue(status, pvmInstance);
|