@@ -838,7 +838,8 @@ static bool CheckHashSig(const ProTx& proTx, const PKHash& pkhash, TxValidationS
838838template <typename ProTx>
839839static bool CheckStringSig (const ProTx& proTx, const PKHash& pkhash, TxValidationState& state)
840840{
841- if (std::string strError; !CMessageSigner::VerifyMessage (ToKeyID (pkhash), proTx.vchSig , proTx.MakeSignString (), strError)) {
841+ if (std::string strError;
842+ !CMessageSigner::VerifyMessage (ToKeyID (pkhash), proTx.vchSig , proTx.MakeSignString (), strError)) {
842843 return state.Invalid (TxValidationResult::TX_CONSENSUS, " bad-protx-sig" );
843844 }
844845 return true ;
@@ -884,8 +885,8 @@ static std::optional<ProTx> GetValidatedPayload(const CTransaction& tx, gsl::not
884885 * @returns true if version change is valid or DEPLOYMENT_V24 is not active
885886 */
886887static bool IsVersionChangeValid (gsl::not_null<const CBlockIndex*> pindexPrev, const uint16_t tx_type,
887- const uint16_t state_version, const uint16_t tx_version , const ChainstateManager& chainman ,
888- TxValidationState& state)
888+ const uint16_t state_version , const uint16_t tx_version ,
889+ const ChainstateManager& chainman, TxValidationState& state)
889890{
890891 if (!DeploymentActiveAfter (pindexPrev, chainman, Consensus::DEPLOYMENT_V24)) {
891892 // New restrictions only apply after v24 deployment
@@ -927,8 +928,8 @@ bool CheckProRegTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*> pin
927928 return state.Invalid (TxValidationResult::TX_CONSENSUS, " bad-protx-version-disallowed" );
928929 }
929930
930- // It's allowed to set addr to 0, which will put the MN into PoSe-banned state and require a ProUpServTx to be issues later
931- // If any of both is set, it must be valid however
931+ // It's allowed to set addr to 0, which will put the MN into PoSe-banned state and require a ProUpServTx to be
932+ // issues later. If any of both is set, it must be valid however
932933 if (!opt_ptx->netInfo ->IsEmpty () && !CheckService (*opt_ptx, state)) {
933934 // pass the state returned by the function above
934935 return false ;
@@ -941,7 +942,7 @@ bool CheckProRegTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*> pin
941942 }
942943
943944 CTxDestination collateralTxDest;
944- const PKHash * keyForPayloadSig = nullptr ;
945+ const PKHash* keyForPayloadSig = nullptr ;
945946 COutPoint collateralOutpoint;
946947
947948 CAmount expectedCollateral = GetMnType (opt_ptx->nType ).collat_amount ;
@@ -981,7 +982,8 @@ bool CheckProRegTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*> pin
981982
982983 // don't allow reuse of collateral key for other keys (don't allow people to put the collateral key onto an online server)
983984 // this check applies to internal and external collateral, but internal collaterals are not necessarily a P2PKH
984- if (collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDOwner )) || collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
985+ if (collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDOwner )) ||
986+ collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
985987 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-collateral-reuse" );
986988 }
987989
@@ -1084,7 +1086,8 @@ bool CheckProUpServTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*>
10841086 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-dup-netinfo-entry" );
10851087 }
10861088 } else if (const auto domain_opt{entry.GetDomainPort ()}) {
1087- if (mnList.HasUniqueProperty (*domain_opt) && mnList.GetUniquePropertyMN (*domain_opt)->proTxHash != opt_ptx->proTxHash ) {
1089+ if (mnList.HasUniqueProperty (*domain_opt) &&
1090+ mnList.GetUniquePropertyMN (*domain_opt)->proTxHash != opt_ptx->proTxHash ) {
10881091 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-dup-netinfo-entry" );
10891092 }
10901093 } else {
@@ -1094,7 +1097,8 @@ bool CheckProUpServTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*>
10941097
10951098 // don't allow updating to platformNodeIds already used by other EvoNodes
10961099 if (opt_ptx->nType == MnType::Evo) {
1097- if (mnList.HasUniqueProperty (opt_ptx->platformNodeID ) && mnList.GetUniquePropertyMN (opt_ptx->platformNodeID )->proTxHash != opt_ptx->proTxHash ) {
1100+ if (mnList.HasUniqueProperty (opt_ptx->platformNodeID ) &&
1101+ mnList.GetUniquePropertyMN (opt_ptx->platformNodeID )->proTxHash != opt_ptx->proTxHash ) {
10981102 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-dup-platformnodeid" );
10991103 }
11001104 }
@@ -1150,7 +1154,8 @@ bool CheckProUpRegTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*> p
11501154 }
11511155
11521156 // don't allow reuse of payee key for other keys (don't allow people to put the payee key onto an online server)
1153- if (payoutDest == CTxDestination (PKHash (dmn->pdmnState ->keyIDOwner )) || payoutDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
1157+ if (payoutDest == CTxDestination (PKHash (dmn->pdmnState ->keyIDOwner )) ||
1158+ payoutDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
11541159 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-payee-reuse" );
11551160 }
11561161
@@ -1165,7 +1170,8 @@ bool CheckProUpRegTx(const CTransaction& tx, gsl::not_null<const CBlockIndex*> p
11651170 if (!ExtractDestination (coin.out .scriptPubKey , collateralTxDest)) {
11661171 return state.Invalid (TxValidationResult::TX_CONSENSUS, " bad-protx-collateral-dest" );
11671172 }
1168- if (collateralTxDest == CTxDestination (PKHash (dmn->pdmnState ->keyIDOwner )) || collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
1173+ if (collateralTxDest == CTxDestination (PKHash (dmn->pdmnState ->keyIDOwner )) ||
1174+ collateralTxDest == CTxDestination (PKHash (opt_ptx->keyIDVoting ))) {
11691175 return state.Invalid (TxValidationResult::TX_BAD_SPECIAL, " bad-protx-collateral-reuse" );
11701176 }
11711177
0 commit comments