diff --git a/libethereum/Transaction.h b/libethereum/Transaction.h index 95e1619fe..77ba1824d 100644 --- a/libethereum/Transaction.h +++ b/libethereum/Transaction.h @@ -85,7 +85,25 @@ public: /// Constructs a null transaction. Transaction() {} - using TransactionBase::TransactionBase; + /// Constructs a signed message-call transaction. + Transaction(u256 const& _value, u256 const& _gasPrice, u256 const& _gas, Address const& _dest, bytes const& _data, u256 const& _nonce, Secret const& _secret): + TransactionBase(_value, _gasPrice, _gas, _dest, _data, _nonce, _secret) + {} + + /// Constructs a signed contract-creation transaction. + Transaction(u256 const& _value, u256 const& _gasPrice, u256 const& _gas, bytes const& _data, u256 const& _nonce, Secret const& _secret): + TransactionBase(_value, _gasPrice, _gas, _data, _nonce, _secret) + {} + + /// Constructs an unsigned message-call transaction. + Transaction(u256 const& _value, u256 const& _gasPrice, u256 const& _gas, Address const& _dest, bytes const& _data, u256 const& _nonce = 0): + TransactionBase(_value, _gasPrice, _gas, _dest, _data, _nonce) + {} + + /// Constructs an unsigned contract-creation transaction. + Transaction(u256 const& _value, u256 const& _gasPrice, u256 const& _gas, bytes const& _data, u256 const& _nonce = 0): + TransactionBase(_value, _gasPrice, _gas, _data, _nonce) + {} /// Constructs a transaction from the given RLP. explicit Transaction(bytesConstRef _rlp, CheckTransaction _checkSig); diff --git a/libethereum/TransactionQueue.cpp b/libethereum/TransactionQueue.cpp index bbda58fd7..d2ced467e 100644 --- a/libethereum/TransactionQueue.cpp +++ b/libethereum/TransactionQueue.cpp @@ -109,7 +109,6 @@ ImportResult TransactionQueue::manageImport_WITH_LOCK(h256 const& _h, Transactio // If it doesn't work, the signature is bad. // The transaction's nonce may yet be invalid (or, it could be "valid" but we may be missing a marginally older transaction). - // Remove any prior transaction with the same nonce but a lower gas price. // Bomb out if there's a prior transaction with higher gas price. auto r = m_senders.equal_range(_transaction.from()); diff --git a/test/libethereum/gaspricer.cpp b/test/libethereum/gaspricer.cpp index 105f4c2d7..ce49a4a20 100644 --- a/test/libethereum/gaspricer.cpp +++ b/test/libethereum/gaspricer.cpp @@ -20,10 +20,9 @@ */ #include -#include #include -#include -#include +#include +#include #include "../TestHelper.h" using namespace std;