mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Allow IS for all txes, not only for txes with p2pkh and data outputs (#1760)
This commit is contained in:
parent
f4502099a4
commit
4802a1fb71
@ -941,17 +941,6 @@ bool CTxLockRequest::IsValid() const
|
||||
}
|
||||
|
||||
CAmount nValueIn = 0;
|
||||
CAmount nValueOut = 0;
|
||||
|
||||
BOOST_FOREACH(const CTxOut& txout, vout) {
|
||||
// InstantSend supports normal scripts and unspendable (i.e. data) scripts.
|
||||
// TODO: Look into other script types that are normal and can be included
|
||||
if(!txout.scriptPubKey.IsPayToPublicKeyHash() && !txout.scriptPubKey.IsUnspendable()) {
|
||||
LogPrint("instantsend", "CTxLockRequest::IsValid -- Invalid Script %s", ToString());
|
||||
return false;
|
||||
}
|
||||
nValueOut += txout.nValue;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const CTxIn& txin, vin) {
|
||||
|
||||
@ -980,6 +969,8 @@ bool CTxLockRequest::IsValid() const
|
||||
return false;
|
||||
}
|
||||
|
||||
CAmount nValueOut = GetValueOut();
|
||||
|
||||
if(nValueIn - nValueOut < GetMinFee()) {
|
||||
LogPrint("instantsend", "CTxLockRequest::IsValid -- did not include enough fees in transaction: fees=%d, tx=%s", nValueOut - nValueIn, ToString());
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user