Skip to content

Commit

Permalink
fix signers
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Dec 13, 2024
1 parent d06b899 commit 749bac0
Show file tree
Hide file tree
Showing 15 changed files with 341 additions and 320 deletions.
98 changes: 0 additions & 98 deletions include/xrpl/protocol/Firewall.h

This file was deleted.

3 changes: 0 additions & 3 deletions include/xrpl/protocol/HashPrefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ enum class HashPrefix : std::uint32_t {

/** Credentials signature */
credential = detail::make_hash_prefix('C', 'R', 'D'),

/** Firewall signature */
firewall = detail::make_hash_prefix('F', 'I', 'R'),
};

template <class Hasher>
Expand Down
2 changes: 1 addition & 1 deletion include/xrpl/protocol/detail/sfields.macro
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,4 @@ UNTYPED_SFIELD(sfPriceDataSeries, ARRAY, 24)
UNTYPED_SFIELD(sfAuthAccounts, ARRAY, 25)
UNTYPED_SFIELD(sfAuthorizeCredentials, ARRAY, 26)
UNTYPED_SFIELD(sfUnauthorizeCredentials, ARRAY, 27)
UNTYPED_SFIELD(sfFirewallSigners, ARRAY, 28)
UNTYPED_SFIELD(sfFirewallSigners, ARRAY, 28, SField::sMD_Default, SField::notSigning)
3 changes: 1 addition & 2 deletions include/xrpl/protocol/detail/transactions.macro
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,7 @@ TRANSACTION(ttFIREWALL_SET, 62, FirewallSet, ({
{sfAuthorize, soeOPTIONAL},
{sfAmount, soeOPTIONAL},
{sfTimePeriod, soeOPTIONAL},
{sfPublicKey, soeOPTIONAL},
{sfSignature, soeOPTIONAL},
{sfFirewallSigners, soeOPTIONAL},
}))

// /** This transaction type deletes an Firewall instance */
Expand Down
8 changes: 8 additions & 0 deletions src/libxrpl/protocol/InnerObjectFormats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ InnerObjectFormats::InnerObjectFormats()
{sfIssuer, soeREQUIRED},
{sfCredentialType, soeREQUIRED},
});

add(sfFirewallSigner.jsonName.c_str(),
sfFirewallSigner.getCode(),
{
{sfAccount, soeREQUIRED},
{sfSigningPubKey, soeREQUIRED},
{sfTxnSignature, soeREQUIRED},
});
}

InnerObjectFormats const&
Expand Down
7 changes: 4 additions & 3 deletions src/libxrpl/protocol/STTx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ STTx::checkFirewallSign(
for (auto const& signer : signers)
{
Blob const& signingPubKey = signer.getFieldVL(sfSigningPubKey);
auto const result = signingPubKey.empty()
? checkMultiSign(signer, requireCanonicalSig, rules)
: checkSingleSign(signer, requireCanonicalSig);
auto const result = checkSingleSign(signer, requireCanonicalSig);
// auto const result = signingPubKey.empty()
// ? checkMultiSign(signer, requireCanonicalSig, rules)
// : checkSingleSign(signer, requireCanonicalSig);

if (!result)
return result;
Expand Down
Loading

0 comments on commit 749bac0

Please sign in to comment.