Browse Source

Small improvements here and there

Add virtual destructor to polymorphic GasPricer.
Init v field of SignatureStruct.
cl-refactor
Paweł Bylica 10 years ago
committed by Paweł Bylica
parent
commit
94718485cd
  1. 4
      libdevcrypto/Common.h
  2. 3
      libethereum/State.h

4
libdevcrypto/Common.h

@ -45,7 +45,7 @@ using Signature = h520;
struct SignatureStruct
{
SignatureStruct() {}
SignatureStruct() = default;
SignatureStruct(Signature const& _s) { *(h520*)this = _s; }
SignatureStruct(h256 const& _r, h256 const& _s, byte _v): r(_r), s(_s), v(_v) {}
operator Signature() const { return *(h520 const*)this; }
@ -55,7 +55,7 @@ struct SignatureStruct
h256 r;
h256 s;
byte v;
byte v = 0;
};
/// An Ethereum address: 20 bytes.

3
libethereum/State.h

@ -68,7 +68,8 @@ enum class TransactionPriority
class GasPricer
{
public:
GasPricer() {}
GasPricer() = default;
virtual ~GasPricer() = default;
virtual u256 ask(State const&) const = 0;
virtual u256 bid(TransactionPriority _p = TransactionPriority::Medium) const = 0;

Loading…
Cancel
Save