mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Allow to distinguish out of gas from other traps (#4883)
* contracts: Allow to distinguish out of gas from other traps
When a contract encounters a runtime error a wasm trap is
triggered and the execution is halted. Currently, no matter
what was the cause for the trap it is always reported as:
DispatchError::Other("contract trapped during execution").
However, the trap that is triggered if a contract exhausts
its gas budget is particulary interesting. Therefore we add
a seperate error message for this cause:
DispatchError::Other("ran out of gas during contract execution").
A test is added hat executes a contract that never terminates.
Therefore it always exhausts is gas budget.
* fixup! contracts: Allow to distinguish out of gas from other traps
Remove overlong lines.
* fixup! contracts: Allow to distinguish out of gas from other traps
Rename Contract to Contracts
This commit is contained in:
committed by
GitHub
parent
5b7512e2e4
commit
b999911bcf
@@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to 0. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 218,
|
||||
spec_version: 219,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user