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

Return first txid-matching transaction #933

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Return first txid-matching transaction #933

merged 1 commit into from
Sep 1, 2023

Conversation

romanz
Copy link
Owner

@romanz romanz commented Aug 31, 2023

Should resolve the ordering issue (returning the first matching tx), as well as not parsing the next blocks.

@romanz romanz merged commit 3c6028e into master Sep 1, 2023
@romanz romanz deleted the fix-tx-order branch September 1, 2023 13:27
@romanz
Copy link
Owner Author

romanz commented Sep 2, 2023

Tested manually:

$ echo '{"jsonrpc": "2.0", "method": "blockchain.transaction.get", "params": ["e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468", true], "id": 0}' | netcat 127.0.0.1 50001
{"id":0,"jsonrpc":"2.0","result":{"blockhash":"00000000000271a2dc26e7667f8419f2e15416dc6955e5a6c6cdf3f2574dd08e","blocktime":1289723848,"confirmations":714144,"hash":"e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468","hex":"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a01000000434104124b212f5416598a92ccec88819105179dcb2550d571842601492718273fe0f2179a9695096bff94cd99dcccdea7cd9bd943bfca8fea649cac963411979a33e9ac00000000","in_active_chain":true,"locktime":0,"size":133,"time":1289723848,"txid":"e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468","version":1,"vin":[{"coinbase":"0456720e1b00","sequence":4294967295}],"vout":[{"n":0,"scriptPubKey":{"asm":"04124b212f5416598a92ccec88819105179dcb2550d571842601492718273fe0f2179a9695096bff94cd99dcccdea7cd9bd943bfca8fea649cac963411979a33e9 OP_CHECKSIG","desc":"pk(04124b212f5416598a92ccec88819105179dcb2550d571842601492718273fe0f2179a9695096bff94cd99dcccdea7cd9bd943bfca8fea649cac963411979a33e9)#ss7pe7ny","hex":"4104124b212f5416598a92ccec88819105179dcb2550d571842601492718273fe0f2179a9695096bff94cd99dcccdea7cd9bd943bfca8fea649cac963411979a33e9ac","type":"pubkey"},"value":50.0}],"vsize":133,"weight":532}}

$ echo '{"jsonrpc": "2.0", "method": "blockchain.transaction.get", "params": ["d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599", true], "id": 0}' | netcat 127.0.0.1 50001
{"id":0,"jsonrpc":"2.0","result":{"blockhash":"00000000000af0aed4792b1acee3d966af36cf5def14935db8de83d6f9306f2f","blocktime":1289757588,"confirmations":714054,"hash":"d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599","hex":"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a010000004341046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac00000000","in_active_chain":true,"locktime":0,"size":133,"time":1289757588,"txid":"d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599","version":1,"vin":[{"coinbase":"0456720e1b00","sequence":4294967295}],"vout":[{"n":0,"scriptPubKey":{"asm":"046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9c OP_CHECKSIG","desc":"pk(046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9c)#4pqpyumn","hex":"41046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac","type":"pubkey"},"value":50.0}],"vsize":133,"weight":532}}

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