MCPcopy Create free account
hub / github.com/LUX-Core/lux / performByteCode

Method performByteCode

src/main.cpp:7854–7873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7852}
7853
7854bool ByteCodeExec::performByteCode(dev::eth::Permanence type){
7855 for(LuxTransaction& tx : txs){
7856 //validate VM version
7857 if(tx.getVersion().toRaw() != VersionVM::GetEVMDefault().toRaw()){
7858 return false;
7859 }
7860 dev::eth::EnvInfo envInfo(BuildEVMEnvironment());
7861 if(!tx.isCreation() && !globalState->addressInUse(tx.receiveAddress())){
7862 dev::eth::ExecutionResult execRes;
7863 execRes.excepted = dev::eth::TransactionException::Unknown;
7864 result.push_back(ResultExecute{execRes, dev::eth::TransactionReceipt(dev::h256(), dev::u256(), dev::eth::LogEntries()), CTransaction()});
7865 continue;
7866 }
7867 result.push_back(globalState->execute(envInfo, *globalSealEngine.get(), tx, type, OnOpFunc()));
7868 }
7869 globalState->db().commit();
7870 globalState->dbUtxo().commit();
7871 globalSealEngine.get()->deleteAddresses.clear();
7872 return true;
7873}
7874
7875bool ByteCodeExec::processingResults(ByteCodeExecResult& resultBCE){
7876 for(size_t i = 0; i < result.size(); i++){

Callers 3

ConnectBlockFunction · 0.80
CallContractFunction · 0.80

Calls 13

TransactionReceiptClass · 0.85
toRawMethod · 0.80
isCreationMethod · 0.80
receiveAddressMethod · 0.80
CTransactionClass · 0.70
getVersionMethod · 0.45
addressInUseMethod · 0.45
push_backMethod · 0.45
executeMethod · 0.45
getMethod · 0.45
commitMethod · 0.45
dbMethod · 0.45

Tested by

no test coverage detected