forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rpc):
gettxchainlocks
should return mempool=false
when tx no…
…t in mempool (#5742) ## Issue being fixed or feature implemented Platform (in the scope of Withdrawals) need to be aware if a tx isn't in mempool when requesting status of a tx using RPC `gettxchainlocks`. cc @markin-io ## What was done? - mempool is passed to `GetTransaction` and saving the result for checking latter. - If the returned tx_ref is nullptr, then the RPC returns null for the corresponding tx in the array. Example: `tx1` is mined and chainlocked, `tx2` is in mempool and `tx3` doesn't exist. The result now is: `[ { "height": 830, "chainlock": false, "mempool": true }, { "height": -1, "chainlock": false, "mempool": true }, { "height": -1, "chainlock": false, "mempool": false } ]` ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: Konstantin Akimov <[email protected]> Co-authored-by: UdjinM6 <[email protected]>
- Loading branch information
1 parent
563cc34
commit 25cef45
Showing
3 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RPC changes | ||
----------- | ||
|
||
RPC `gettxchainlocks` will also return the status `mempool` indicating wether the transaction is in the mempool or not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters