Use Permission to check if a Transactor is enabled

- Adds a Permission::getTxFeature lookup function to find the
  controlling amendment for a Transactor, if any.
- Returns temDISABLED from preflight if there is an amendment and it's
  not enabled.
- Still need to go through and remove all the now-redundant isEnabled
  functions.
This commit is contained in:
Ed Hennis
2025-09-10 20:33:01 -04:00
parent e5f99e8ee7
commit 1b295c7c00
3 changed files with 27 additions and 6 deletions

View File

@@ -83,6 +83,9 @@ public:
std::optional<TxType>
getGranularTxType(GranularPermissionType const& gpType) const;
std::optional<std::reference_wrapper<uint256 const>> const
getTxFeature(TxType txType) const;
bool
isDelegatable(std::uint32_t const& permissionValue, Rules const& rules)
const;