mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +00:00
Contracts: Update Config::Debug (#14789)
* Update Debug trait * Rename * tweak * fmt * Better namings * rm unsafe-debug * rework doc * nit * fix comment * clippy * update naming * Rename file * fmt fixes * rename * Move tracing behind umbrella Debugging trait * fix * fix comment * reorder imports * comment * update doc * add missing doc * add missing doc * Update Debugging -> Debugger * Update bin/node/runtime/Cargo.toml
This commit is contained in:
@@ -15,9 +15,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[cfg(feature = "unsafe-debug")]
|
||||
use crate::unsafe_debug::ExecutionObserver;
|
||||
use crate::{
|
||||
debug::{CallSpan, Tracing},
|
||||
gas::GasMeter,
|
||||
storage::{self, meter::Diff, WriteOutcome},
|
||||
BalanceOf, CodeHash, CodeInfo, CodeInfoOf, Config, ContractInfo, ContractInfoOf,
|
||||
@@ -908,20 +907,15 @@ where
|
||||
// Every non delegate call or instantiate also optionally transfers the balance.
|
||||
self.initial_transfer()?;
|
||||
|
||||
#[cfg(feature = "unsafe-debug")]
|
||||
let (code_hash, input_clone) = {
|
||||
let code_hash = *executable.code_hash();
|
||||
T::Debug::before_call(&code_hash, entry_point, &input_data);
|
||||
(code_hash, input_data.clone())
|
||||
};
|
||||
let call_span =
|
||||
T::Debug::new_call_span(executable.code_hash(), entry_point, &input_data);
|
||||
|
||||
// Call into the Wasm blob.
|
||||
let output = executable
|
||||
.execute(self, &entry_point, input_data)
|
||||
.map_err(|e| ExecError { error: e.error, origin: ErrorOrigin::Callee })?;
|
||||
|
||||
#[cfg(feature = "unsafe-debug")]
|
||||
T::Debug::after_call(&code_hash, entry_point, input_clone, &output);
|
||||
call_span.after_call(&output);
|
||||
|
||||
// Avoid useless work that would be reverted anyways.
|
||||
if output.did_revert() {
|
||||
|
||||
Reference in New Issue
Block a user