Bitcoin Forum
May 02, 2024, 12:55:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: "No such mempool transaction" When Trying to Get a Raw Transaction  (Read 569 times)
u87982 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 1


View Profile
October 24, 2017, 01:52:07 AM
Merited by ABCbits (1)
 #1

I'm using Bitcoin core and trying to get a raw transaction using the command:

bitcoin-cli getrawtransaction d5ada064c6417ca25c4308bd158c34b77e1c0eca2a73cda16c737e7424afba2f

It's a transaction in the block at height 277316.  I'm getting the message "No such mempool transaction. Use -txindex to enable blockchain transaction queries. Use gettransaction for wallet transactions."  It sounds like I'm supposed to use a -txindex option but when I type "bitcoin-cli help getrawtransaction" it doesn't say anything about this option and it doesn't work when I try it.  What does this message mean and how do I resolve it?  The other weird thing is that it works with some transactions in the block, but not all.  There are 419 transactions in that block and for 34 of them, the getrawtransaction command works the way I'm trying to use it.  All the rest fail. 

I've seen another post where it says that this message can sometimes mean that it's a transaction that was never accepted by the network, but I just started my full node and downloaded a fresh copy of the blockchain a few days ago and the transactions that are giving me errors show up on https://blockexplorer.com/blocks.  Thanks!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714611342
Hero Member
*
Offline Offline

Posts: 1714611342

View Profile Personal Message (Offline)

Ignore
1714611342
Reply with quote  #2

1714611342
Report to moderator
Taras
Legendary
*
Offline Offline

Activity: 1386
Merit: 1053


Please do not PM me loan requests!


View Profile WWW
October 24, 2017, 02:34:25 AM
Merited by ABCbits (2)
 #2

If you don't have -txindex set, you can't use getrawtransaction anywhere you want. You'll have to run bitcoin with the -txindex option set.

That transaction is confirmed, very deeply. You just can't see it, because your client isn't indexing it.

In bitcoin.conf, you might be able to add a line that says txindex=1 and then it will work (after it goes through your copy of the blockchain creating a database of all the transactions in it!) but if that doesn't work then just run bitcoin-qt or bitcoind with the -txindex=1 option in the command line.

A lot of people try to test if they have txindex by checking if they can use this command on the transaction in the genesis block, but it is specifically excluded, so don't get confused just in case you try to do that.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
October 24, 2017, 03:39:06 AM
Merited by ABCbits (1)
 #3

getrawtransaction will only work for transactions that your wallet is indexing... by default, it only indexes transactions that actually affect your wallet (ie. incoming and outgoing transactions to your wallet addresses)... or are currently in the mempool of your node.

If you use the -txindex=1 commandline argument (or add it to your bitcoin.conf), then Bitcoin Core will index EVERY transaction in the blockchain, and you'll be able to retrieve the information for them all, regardless of whether or not the transaction involves an address in your wallet or is in the mempool of your node.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
u87982 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 1


View Profile
October 24, 2017, 04:43:53 AM
 #4

I added txindex=1 to bitcoin.conf and restarted bitcoind and that did it Smiley  Thanks!
rrr2018
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 11, 2018, 02:23:15 AM
 #5

I have the same problem with the  wallet ELECTRUM, was sent me bitcoinsBTC 10 January 2017, this amount was divided into several parts ,after 3-4 hours I saw part of the transaction in my wallet electrum , but this was not the full amount ,and they in the unconfirmed status ,and after 2-3 hours when I again opened his wallet electrum ,I found that are no more of these transactions . Now 24 hours passed , and these transactions have not appeared in my wallet . On the blockchain all of the transactions in full size available , but still unconfirmed! You tell me please, what to do ? Please help me ! I've read a lot of forums and a variety of tips , but so far to no avail
P.S. I've using version 3.05 ,updated yesterday , but the problem occurred before the update .

Valle
Full Member
***
Offline Offline

Activity: 177
Merit: 101


View Profile
January 11, 2018, 05:15:41 AM
 #6

I wonder why getrawtransaction doesn't return proper error like "No indexed transactions, run app with txindex=1".
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
January 11, 2018, 11:35:40 AM
Merited by ABCbits (1)
 #7

I wonder why getrawtransaction doesn't return proper error like "No indexed transactions, run app with txindex=1".
It's not exactly useful for most users to get raw transactions for those that are confirmed. The client cannot tell if the user is trying to get an unconfirmed or confirmed transaction and it would just be a waste of time for users to index the transactions. Basic users just need information about their own transactions or from the mempool.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!