mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
v26 - removed non-standard tx check
This commit is contained in:
parent
7ff6198ad5
commit
bb3fc35f21
@ -9,7 +9,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 10
|
||||
#define CLIENT_VERSION_REVISION 12
|
||||
#define CLIENT_VERSION_BUILD 25
|
||||
#define CLIENT_VERSION_BUILD 26
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
#define CLIENT_VERSION_IS_RELEASE true
|
||||
|
42
src/main.cpp
42
src/main.cpp
@ -837,11 +837,11 @@ bool CTxMemPool::acceptableInputs(CValidationState &state, CTransaction &tx, boo
|
||||
return error("CTxMemPool::acceptableInputs() : not accepting nLockTime beyond 2038 yet");
|
||||
|
||||
// Rather not work on nonstandard transactions (unless -testnet)
|
||||
string strNonStd;
|
||||
/* string strNonStd;
|
||||
if (!fTestNet && !tx.IsStandard(strNonStd))
|
||||
return error("CTxMemPool::acceptableInputs() : nonstandard transaction (%s)",
|
||||
strNonStd.c_str());
|
||||
|
||||
*/
|
||||
// Check for conflicts with in-memory transactions
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
@ -912,11 +912,11 @@ bool CTxMemPool::acceptable(CValidationState &state, CTransaction &tx, bool fChe
|
||||
if ((int64)tx.nLockTime > std::numeric_limits<int>::max())
|
||||
return error("CTxMemPool::acceptable() : not accepting nLockTime beyond 2038 yet");
|
||||
// Rather not work on nonstandard transactions (unless -testnet)
|
||||
string strNonStd;
|
||||
/*string strNonStd;
|
||||
if (!fTestNet && !tx.IsStandard(strNonStd))
|
||||
return error("CTxMemPool::acceptable() : nonstandard transaction (%s)",
|
||||
strNonStd.c_str());
|
||||
|
||||
*/
|
||||
// is it already in the memory pool?
|
||||
uint256 hash = tx.GetHash();
|
||||
{
|
||||
@ -984,11 +984,11 @@ bool CTxMemPool::acceptable(CValidationState &state, CTransaction &tx, bool fChe
|
||||
}
|
||||
|
||||
|
||||
// Check for non-standard pay-to-script-hash in inputs
|
||||
/* // Check for non-standard pay-to-script-hash in inputs
|
||||
if (!tx.AreInputsStandard(view) && !fTestNet) {
|
||||
return error("CTxMemPool::acceptable() : nonstandard transaction input");
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// Note: if you modify this code to accept non-standard transactions, then
|
||||
// you should add code here to check that the transaction does a
|
||||
@ -6483,6 +6483,36 @@ void CDarkSendPool::SendMoney(const CTransaction& collateral, std::vector<CTxIn>
|
||||
|
||||
ClearLastMessage();
|
||||
|
||||
//check it like a transaction
|
||||
{
|
||||
int64 nValueIn = 0;
|
||||
int64 nValueOut = 0;
|
||||
bool missingTx = false;
|
||||
|
||||
CValidationState state;
|
||||
CTransaction tx;
|
||||
|
||||
BOOST_FOREACH(const CTxOut o, vout){
|
||||
nValueOut += o.nValue;
|
||||
tx.vout.push_back(o);
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const CTxIn i, vin){
|
||||
tx.vin.push_back(i);
|
||||
|
||||
LogPrintf("dsi -- tx in %s\n", i.ToString().c_str());
|
||||
}
|
||||
|
||||
|
||||
bool missing = false;
|
||||
if (!tx.IsAcceptable(state, true, false, &missing, false)){ //AcceptableInputs(state, true)){
|
||||
LogPrintf("dsi -- transactione not valid! %s \n", tx.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// store our entry for later use
|
||||
CDarkSendEntry e;
|
||||
e.Add(vin, amount, collateral, vout);
|
||||
|
@ -2628,7 +2628,7 @@ static const int64 DARKSEND_FEE = 0.001*COIN;
|
||||
class CDarkSendPool
|
||||
{
|
||||
public:
|
||||
static const int MIN_PEER_PROTO_VERSION = 70034;
|
||||
static const int MIN_PEER_PROTO_VERSION = 70035;
|
||||
|
||||
std::vector<CDarkSendEntry> myEntries;
|
||||
std::vector<CDarkSendEntry> entries;
|
||||
|
@ -25,7 +25,7 @@ extern const std::string CLIENT_DATE;
|
||||
// network protocol versioning
|
||||
//
|
||||
|
||||
static const int PROTOCOL_VERSION = 70034;
|
||||
static const int PROTOCOL_VERSION = 70035;
|
||||
|
||||
// intial proto version, to be increased after version/verack negotiation
|
||||
static const int INIT_PROTO_VERSION = 209;
|
||||
|
Loading…
Reference in New Issue
Block a user