mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Draft of new LOG/bloom/headers/block format.
This commit is contained in:
parent
9c691e917f
commit
bded2ff372
@ -147,7 +147,7 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItemsConstRef _i)
|
|||||||
return _out;
|
return _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ostream& Assembly::streamOut(ostream& _out, string const& _prefix) const
|
ostream& Assembly::streamRLP(ostream& _out, string const& _prefix) const
|
||||||
{
|
{
|
||||||
_out << _prefix << ".code:" << endl;
|
_out << _prefix << ".code:" << endl;
|
||||||
for (AssemblyItem const& i: m_items)
|
for (AssemblyItem const& i: m_items)
|
||||||
@ -189,7 +189,7 @@ ostream& Assembly::streamOut(ostream& _out, string const& _prefix) const
|
|||||||
for (auto const& i: m_subs)
|
for (auto const& i: m_subs)
|
||||||
{
|
{
|
||||||
_out << _prefix << " " << hex << (unsigned)(u256)i.first << ": " << endl;
|
_out << _prefix << " " << hex << (unsigned)(u256)i.first << ": " << endl;
|
||||||
i.second.streamOut(_out, _prefix + " ");
|
i.second.streamRLP(_out, _prefix + " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _out;
|
return _out;
|
||||||
|
@ -104,11 +104,11 @@ public:
|
|||||||
|
|
||||||
void injectStart(AssemblyItem const& _i);
|
void injectStart(AssemblyItem const& _i);
|
||||||
|
|
||||||
std::string out() const { std::stringstream ret; streamOut(ret); return ret.str(); }
|
std::string out() const { std::stringstream ret; streamRLP(ret); return ret.str(); }
|
||||||
int deposit() const { return m_deposit; }
|
int deposit() const { return m_deposit; }
|
||||||
bytes assemble() const;
|
bytes assemble() const;
|
||||||
Assembly& optimise(bool _enable);
|
Assembly& optimise(bool _enable);
|
||||||
std::ostream& streamOut(std::ostream& _out, std::string const& _prefix = "") const;
|
std::ostream& streamRLP(std::ostream& _out, std::string const& _prefix = "") const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void donePath() { if (m_totalDeposit != INT_MAX && m_totalDeposit != m_deposit) BOOST_THROW_EXCEPTION(InvalidDeposit()); }
|
void donePath() { if (m_totalDeposit != INT_MAX && m_totalDeposit != m_deposit) BOOST_THROW_EXCEPTION(InvalidDeposit()); }
|
||||||
@ -127,7 +127,7 @@ private:
|
|||||||
|
|
||||||
inline std::ostream& operator<<(std::ostream& _out, Assembly const& _a)
|
inline std::ostream& operator<<(std::ostream& _out, Assembly const& _a)
|
||||||
{
|
{
|
||||||
_a.streamOut(_out);
|
_a.streamRLP(_out);
|
||||||
return _out;
|
return _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user