diff --git a/src/validation.cpp b/src/validation.cpp index b51a47be5e..6e699b832f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2526,7 +2526,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin vPos.push_back(std::make_pair(tx.GetHash(), pos)); for (unsigned int i = 0; i < tx.vout.size(); i++) { CTxOut txout= tx.vout[i]; - if (txout.scriptPubKey.IsWithdrawLock() && txout.nValue.IsExplicit()) + if (txout.scriptPubKey.IsWithdrawLock() && txout.nValue.IsExplicit() && txout.nAsset.IsExplicit() && txout.nAsset.GetAsset() == BITCOINID) mLocksCreated.insert(std::make_pair(txout.scriptPubKey.GetWithdrawLockGenesisHash(), std::make_pair(COutPoint(tx.GetHash(), i), txout.nValue.GetAmount()))); } @@ -2718,8 +2718,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin for (unsigned int j = 0; j < tx.vout.size(); j++) { CTxOut txout = tx.vout[j]; - if (txout.scriptPubKey.IsWithdrawLock() && txout.nValue.IsExplicit()) + if (txout.scriptPubKey.IsWithdrawLock() && txout.nValue.IsExplicit() && txout.nAsset.IsExplicit() && txout.nAsset.GetAsset() == BITCOINID) { mLocksCreated.insert(std::make_pair(txout.scriptPubKey.GetWithdrawLockGenesisHash(), std::make_pair(COutPoint(tx.GetHash(), j), txout.nValue.GetAmount()))); + } } if (!tx.HasValidFee()) return state.DoS(100, error("ConnectBlock(): transaction fee overflowed"), REJECT_INVALID, "bad-fee-outofrange");