55 std::vector<std::pair<u256, std::string>>
const&
units();
64 static const u256 ether = exp10<18>();
65 static const u256 finney = exp10<15>();
66 static const u256 szabo = exp10<12>();
67 static const u256 shannon = exp10<9>();
76 static const h256 LatestBlockHash =
h256(2);
77 static const h256 EarliestBlockHash =
h256(1);
78 static const h256 PendingBlockHash =
h256(0);
80 static const u256 DefaultBlockGasLimit = 4712388;
117 TransactionBasic = 8,
119 TransactionSignatures = 32,
123 CheckUncles = UncleBasic | UncleSeals,
124 CheckTransactions = TransactionBasic | TransactionSignatures,
125 OutOfOrderChecks = ValidSeal | CheckUncles | CheckTransactions,
126 InOrderChecks = Parent | UncleParent,
127 Everything = ValidSeal | CheckUncles | CheckTransactions | Parent | UncleParent,
145 void fire(Args
const&... _args) { m_h(_args...); }
157 for (
auto const&
h : m_fire)
158 if (
auto l =
h.second.lock())
164 auto n = m_fire.empty() ? 0 : (m_fire.rbegin()->first + 1);
165 auto h = std::shared_ptr<HandlerAux>(
new HandlerAux(n,
this, _h));
173 if (
auto h =
f.lock())
178 std::map<unsigned, std::weak_ptr<typename Signal::HandlerAux>>
m_fire;
181 template<
class... Args>
using Handler = std::shared_ptr<
typename Signal<Args...>::HandlerAux>;
185 bool creation =
false;
210 u256 rate()
const {
return ms == 0 ? 0 : hashes * 1000 / ms; }
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Super-duper signal mechanism. TODO: replace with somthing a bit heavier weight.
void fire(Args const &..._args)
#define function(a, b, c, d, k, s)
const unsigned c_protocolVersion
Current protocol version.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<>> bigint
h160 Address
An Ethereum address: 20 bytes.
std::vector< U > valuesOf(std::map< T, U > const &_m)
Import transaction even if it was dropped before.
void badBlock(bytesConstRef _block, string const &_err)
IfDropped
Import transaction policy.
std::shared_ptr< typename Signal< Args... >::HandlerAux > Handler
std::vector< byte > bytes
Don't import transaction that was previously dropped.
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
std::shared_ptr< HandlerAux > add(Callback const &_h)
Address toAddress(std::string const &_s)
Convert the given string into an address.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
std::string formatBalance(bigint const &_b)
User-friendly string representation of the amount _b in wei.
Encodes a transaction, ready to be exported to or freshly imported from RLP.
Describes the progress of a mining operation.
const unsigned c_minorProtocolVersion
Current minor protocol version.
const unsigned c_databaseVersion
Current database version.
void operator()(Args const &..._args)
HandlerAux(unsigned _i, Signal *_s, Callback const &_h)
std::vector< Transaction > goodTranactions
std::vector< h256 > h256s
DEV_SIMPLE_EXCEPTION(InvalidSealEngine)
std::vector< LogBloom > LogBlooms
Many log blooms.
std::map< unsigned, std::weak_ptr< typename Signal::HandlerAux > > m_fire
vector< pair< u256, string > > const & units()
Get information concerning the currency denominations.