Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proof.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | for (const SignedStake &ss : stakes) { | ||||
// Only PKHash are supported. | // Only PKHash are supported. | ||||
return state.Invalid( | return state.Invalid( | ||||
ProofValidationResult::DESTINATION_NOT_SUPPORTED); | ProofValidationResult::DESTINATION_NOT_SUPPORTED); | ||||
} | } | ||||
const CPubKey &pubkey = s.getPubkey(); | const CPubKey &pubkey = s.getPubkey(); | ||||
if (*pkhash != PKHash(pubkey)) { | if (*pkhash != PKHash(pubkey)) { | ||||
// Wrong pubkey. | // Wrong pubkey. | ||||
return state.Invalid(ProofValidationResult::DESTINATION_MISMACTCH); | return state.Invalid(ProofValidationResult::DESTINATION_MISMATCH); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
} // namespace avalanche | } // namespace avalanche |