Skip to content

Commit

Permalink
Remove restriction that forced use of same addresses for payout and c…
Browse files Browse the repository at this point in the history
…ollateral
  • Loading branch information
codablock committed Nov 14, 2018
1 parent 7c1f110 commit 9adf8ad
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/evo/providertx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ bool CheckProRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValid
if (tx.vout[ptx.collateralOutpoint.n].nValue != 1000 * COIN) {
return state.DoS(10, false, REJECT_INVALID, "bad-protx-collateral");
}

// This is a temporary restriction that will be lifted later
// It is required while we are transitioning from the old MN list to the deterministic list
if (tx.vout[ptx.collateralOutpoint.n].scriptPubKey != ptx.scriptPayout) {
return state.DoS(10, false, REJECT_INVALID, "bad-protx-payee-collateral");
}
}
if (ptx.keyIDOwner.IsNull() || !ptx.pubKeyOperator.IsValid() || ptx.keyIDVoting.IsNull()) {
return state.DoS(10, false, REJECT_INVALID, "bad-protx-key-null");
Expand Down Expand Up @@ -295,15 +289,10 @@ bool CheckProUpRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CVal
return state.DoS(10, false, REJECT_INVALID, "bad-protx-payee-reuse");
}

// This is a temporary restriction that will be lifted later
// It is required while we are transitioning from the old MN list to the deterministic list
Coin coin;
if (!GetUTXOCoin(dmn->collateralOutpoint, coin)) {
return state.DoS(100, false, REJECT_INVALID, "bad-protx-payee-collateral");
}
if (coin.out.scriptPubKey != ptx.scriptPayout) {
return state.DoS(10, false, REJECT_INVALID, "bad-protx-payee-collateral");
}

if (mnList.HasUniqueProperty(ptx.pubKeyOperator)) {
auto otherDmn = mnList.GetUniquePropertyMN(ptx.pubKeyOperator);
Expand Down

0 comments on commit 9adf8ad

Please sign in to comment.