66 std::vector<std::pair<u256, std::string>>
const&
units();
75 static const u256 ether = exp10<18>();
76 static const u256 finney = exp10<15>();
77 static const u256 szabo = exp10<12>();
78 static const u256 shannon = exp10<9>();
87 static const h256 LatestBlockHash =
h256(2);
88 static const h256 EarliestBlockHash =
h256(1);
89 static const h256 PendingBlockHash =
h256(0);
91 static const u256 DefaultBlockGasLimit = 4712388;
164 void fire(Args
const&... _args) { m_h(_args...); }
176 for (
auto const& h : m_fire)
177 if (
auto l = h.second.lock())
183 auto n = m_fire.empty() ? 0 : (m_fire.rbegin()->first + 1);
184 auto h = std::shared_ptr<HandlerAux>(
new HandlerAux(n,
this, _h));
191 for (
auto const& f:
valuesOf(m_fire))
192 if (
auto h = f.lock())
197 std::map<unsigned, std::weak_ptr<typename Signal::HandlerAux>> m_fire;
200 template<
class... Args>
using Handler = std::shared_ptr<
typename Signal<Args...>::HandlerAux>;
213 std::string
userReadable(
bool _toProxy, std::function<std::pair<bool, std::string>(
TransactionSkeleton const&)>
const& _getNatSpec, std::function<std::string(
Address const&)>
const& _formatAddress)
const;
std::string formatBalance(bigint const &_b)
User-friendly string representation of the amount _b in wei.
Super-duper signal mechanism. TODO: replace with somthing a bit heavier weight.
const unsigned c_protocolVersion
Current protocol version.
void operator()(Args const &... _args)
Do all checks that cannot be done independently of prior blocks having been imported.
std::string userReadable(bool _toProxy, std::function< std::pair< bool, std::string >(TransactionSkeleton const &)> const &_getNatSpec, std::function< std::string(Address const &)> const &_formatAddress) const
Check the basic structure of the uncles.
Address toAddress(std::string const &_s)
Convert the given string into an address.
const Address c_blockhashContractAddress(0xf0)
Address of the special contract for block hash storage defined in EIP96.
std::vector< U > valuesOf(std::map< T, U > const &_m)
Import transaction even if it was dropped before.
Check the basic structure of the transactions.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<> > bigint
void badBlock(bytesConstRef _block, string const &_err)
IfDropped
Import transaction policy.
std::shared_ptr< typename Signal< Args... >::HandlerAux > Handler
Require block to be non-genesis.
Check the basic structure of the transactions.
u256 constexpr Invalid256
Check parent block header.
std::vector< byte > bytes
const bytes c_blockhashContractCode
Code of the special contract for block hash storage defined in EIP96.
uint64_t ms
Total number of milliseconds of mining thus far.
Don't import transaction that was previously dropped.
std::shared_ptr< HandlerAux > add(Callback const &_h)
Do all checks that can be done independently of prior blocks having been imported.
Check uncle parent block header.
uint64_t hashes
Total number of hashes computed.
Describes the progress of a mining operation.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > u256
const unsigned c_minorProtocolVersion
Current minor protocol version.
DEV_SIMPLE_EXCEPTION(NoHashRecorded)
Check transaction signatures.
std::function< void(Args...)> Callback
const unsigned c_databaseVersion
Current database version.
Check the basic structure of the uncles.
std::vector< Transaction > goodTranactions
std::vector< h256 > h256s
std::vector< LogBloom > LogBlooms
Many log blooms.
void fire(Args const &... _args)
vector< pair< u256, string > > const & units()
Get information concerning the currency denominations.