Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and expose to the API fee information about transactions when available #508

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

NicolasDorier
Copy link
Member

@NicolasDorier NicolasDorier commented Jan 28, 2025

This PR is saving in the txs.metadata some useful information such as fee, virtual size and fee rate.

   "metadata": {
    "vsize": 141,
    "fees": 2820,
    "feeRate": 20.0
  }

/v1/cryptos/{cryptoCode}/transactions/{txId} will now also look into the node's getrawtransaction if the data isn't found in the database, regardless of index availability.

I also added getmempoolentry to the list of whitelisted RPC methods exposed by NBXplorer.

It also improve a bit performance by not querying database twice when checking for a match, if it is unsuccessful.

@NicolasDorier NicolasDorier force-pushed the mempoolinfo branch 3 times, most recently from d507848 to f38147f Compare January 28, 2025 14:12
@NicolasDorier NicolasDorier changed the title Add fee and mempool information to txs fetched in the mempool Save and expose to the API fee information about transactions when available Jan 28, 2025
@NicolasDorier NicolasDorier merged commit 916a52b into dgarage:master Jan 30, 2025
1 check passed
@NicolasDorier NicolasDorier deleted the mempoolinfo branch January 30, 2025 05:21
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