aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityExecutionFramework.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/SolidityExecutionFramework.cpp')
-rw-r--r--test/libsolidity/SolidityExecutionFramework.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityExecutionFramework.cpp b/test/libsolidity/SolidityExecutionFramework.cpp
index db48c3a1..43d36f38 100644
--- a/test/libsolidity/SolidityExecutionFramework.cpp
+++ b/test/libsolidity/SolidityExecutionFramework.cpp
@@ -30,12 +30,10 @@ using namespace dev::solidity::test;
ExecutionFramework::ExecutionFramework():
- m_rpc(RPCSession::instance("/tmp/test/geth.ipc")),
- m_sender(m_rpc.account(0)),
- m_state(0)
+ m_rpc(RPCSession::instance("/home/wins/Ethereum/testnet/ethnode1/geth.ipc")),
+ m_sender(m_rpc.account(0))
{
eth::NoProof::init();
- m_sealEngine.reset(eth::ChainParams().createSealEngine());
if (g_logVerbosity != -1)
g_logVerbosity = 0;
@@ -84,6 +82,12 @@ void ExecutionFramework::sendMessage(bytes const& _data, bool _isCreation, u256
}
}
+bool ExecutionFramework::addressHasCode(Address const& _addr)
+{
+ string code = m_rpc.eth_getCode(toString(_addr), "latest");
+ return !code.empty() && code != "0x";
+}
+
u256 ExecutionFramework::balanceAt(Address const& _addr)
{
return u256(m_rpc.eth_getBalance(toString(_addr), "latest"));