Skip to content

rpc: expose effective fee asset - #1577

Open
Abdullah1738 wants to merge 1 commit into
ElementsProject:masterfrom
Abdullah1738:feat/effective-fee-asset
Open

rpc: expose effective fee asset#1577
Abdullah1738 wants to merge 1 commit into
ElementsProject:masterfrom
Abdullah1738:feat/effective-fee-asset

Conversation

@Abdullah1738

Copy link
Copy Markdown

Motivation

Elements accepts -feeasset=<asset-id> and uses the resulting policyAsset for transaction-fee and relay policy, while getsidechaininfo currently exposes only the consensus pegged_asset. An RPC client connected to an already-running node therefore cannot determine whether the operator selected a different effective fee asset.

Change

  • add an always-present fee_asset field to getsidechaininfo
  • define it as the effective policyAsset after startup argument processing
  • keep the existing pegged_asset field unchanged
  • add a wallet-independent functional test covering both the default and an explicit override

The change is additive and read-only. policyAsset is fixed before RPC service starts, so it does not introduce new mutable state or locking.

Local verification

  • rpc_sidechaininfo.py passed directly and through the functional test runner
  • rpc_tweakfedpeg.py --legacy-wallet passed
  • feature_dynafed.py --legacy-wallet passed
  • touched-file, include, Python UTF-8, functional-test-list, mypy, and dead-code checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant