fix: Fix multisign and signfor to check for delegate (#7064)

This commit is contained in:
yinyiqian1
2026-05-20 16:24:09 -04:00
committed by GitHub
parent 242ce3e9e4
commit 9cb0740673
3 changed files with 155 additions and 3 deletions

View File

@@ -535,8 +535,10 @@ STTx::checkMultiSign(Rules const& rules, STObject const& sigObject) const
{
// Used inside the loop in multiSignHelper to enforce that
// the account owner may not multisign for themselves.
// For delegated transactions sfDelegate is the account whose signer list is checked,
// the delegate account itself can not be among the signers.
auto const txnAccountID =
&sigObject != this ? std::nullopt : std::optional<AccountID>(getAccountID(sfAccount));
&sigObject != this ? std::nullopt : std::optional<AccountID>(getFeePayer());
// We can ease the computational load inside the loop a bit by
// pre-constructing part of the data that we hash. Fill a Serializer