mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'upstream/develop' into tests
This commit is contained in:
commit
104ed4d301
@ -117,7 +117,7 @@ private:
|
|||||||
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0)
|
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0)
|
||||||
{
|
{
|
||||||
m_state.addBalance(m_sender, _value); // just in case
|
m_state.addBalance(m_sender, _value); // just in case
|
||||||
eth::Executive executive(m_state, 0);
|
eth::Executive executive(m_state, eth::LastHashes(), 0);
|
||||||
eth::Transaction t = _isCreation ? eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec())
|
eth::Transaction t = _isCreation ? eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec())
|
||||||
: eth::Transaction(_value, m_gasPrice, m_gas, m_contractAddress, _data, 0, KeyPair::create().sec());
|
: eth::Transaction(_value, m_gasPrice, m_gas, m_contractAddress, _data, 0, KeyPair::create().sec());
|
||||||
bytes transactionRLP = t.rlp();
|
bytes transactionRLP = t.rlp();
|
||||||
|
@ -62,7 +62,7 @@ void doStateTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
theState.execute(tx, &output);
|
theState.execute(LastHashes(), tx, &output);
|
||||||
}
|
}
|
||||||
catch (Exception const& _e)
|
catch (Exception const& _e)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ int stateTest()
|
|||||||
assert(t.sender() == myMiner.address());
|
assert(t.sender() == myMiner.address());
|
||||||
tx = t.rlp();
|
tx = t.rlp();
|
||||||
}
|
}
|
||||||
s.execute(tx);
|
s.execute(bc, tx);
|
||||||
|
|
||||||
cout << s;
|
cout << s;
|
||||||
|
|
||||||
|
2
vm.cpp
2
vm.cpp
@ -33,7 +33,7 @@ using namespace dev::eth;
|
|||||||
using namespace dev::test;
|
using namespace dev::test;
|
||||||
|
|
||||||
FakeExtVM::FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth): /// TODO: XXX: remove the default argument & fix.
|
FakeExtVM::FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth): /// TODO: XXX: remove the default argument & fix.
|
||||||
ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, _depth) {}
|
ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, LastHashes(), _depth) {}
|
||||||
|
|
||||||
h160 FakeExtVM::create(u256 _endowment, u256& io_gas, bytesConstRef _init, OnOpFunc const&)
|
h160 FakeExtVM::create(u256 _endowment, u256& io_gas, bytesConstRef _init, OnOpFunc const&)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user