当前位置: 首页>>代码示例>>Java>>正文


Java ProgramTraceListener类代码示例

本文整理汇总了Java中org.ethereum.vm.trace.ProgramTraceListener的典型用法代码示例。如果您正苦于以下问题:Java ProgramTraceListener类的具体用法?Java ProgramTraceListener怎么用?Java ProgramTraceListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProgramTraceListener类属于org.ethereum.vm.trace包,在下文中一共展示了ProgramTraceListener类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Program

import org.ethereum.vm.trace.ProgramTraceListener; //导入依赖的package包/类
public Program(RskSystemProperties config, byte[] ops, ProgramInvoke programInvoke) {
    this.config = config;
    isLogEnabled = logger.isInfoEnabled();
    isGasLogEnabled = gasLogger.isInfoEnabled();

    if (isLogEnabled ) {
        logger.warn("WARNING! VM logging is enabled. This will make the VM 200 times slower. Do not use in production.");
    }

    if (isGasLogEnabled) {
        gasLogger.warn("WARNING! Gas logging is enabled. This will the make VM 200 times slower. Do not use in production.");
    }

    this.invoke = programInvoke;

    this.ops = nullToEmpty(ops);

    this.memory = setupProgramListener(new Memory());
    this.stack = setupProgramListener(new Stack());
    this.stack.ensureCapacity(1024); // faster?
    this.storage = setupProgramListener(new Storage(programInvoke));
    this.trace = new ProgramTrace(config, programInvoke);

    if (useDataWordPool) {
        this.dataWordPool = new java.util.Stack<>();
        this.dataWordPool.ensureCapacity(1024); // faster?
    } else {
        this.dataWordPool = null;
    }

    precompile();
    traceListener = new ProgramTraceListener(config);
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:34,代码来源:Program.java

示例2: Program

import org.ethereum.vm.trace.ProgramTraceListener; //导入依赖的package包/类
public Program(byte[] codeHash, byte[] ops, ProgramInvoke programInvoke, Transaction transaction, SystemProperties config) {
    this.config = config;
    this.invoke = programInvoke;
    this.transaction = transaction;

    this.codeHash = codeHash == null || FastByteComparisons.equal(HashUtil.EMPTY_DATA_HASH, codeHash) ? null : codeHash;
    this.ops = nullToEmpty(ops);

    traceListener = new ProgramTraceListener(config.vmTrace());
    this.memory = setupProgramListener(new Memory());
    this.stack = setupProgramListener(new Stack());
    this.storage = setupProgramListener(new Storage(programInvoke));
    this.trace = new ProgramTrace(config, programInvoke);
    this.blockchainConfig = config.getBlockchainConfig().getConfigForBlock(programInvoke.getNumber().longValue());
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:16,代码来源:Program.java


注:本文中的org.ethereum.vm.trace.ProgramTraceListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。