Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: WatchTheif on April 10, 2014, 03:58:54 PM



Title: How do I Verify that a Transaction is Mine?
Post by: WatchTheif on April 10, 2014, 03:58:54 PM
How does bitcoind know when a transaction is related or of relevance to my address(es)?

How can I check if a transaction is mine quickly? I understand gettransaction will throw an exception when it is not mine, but is there a faster way?


Cheers!


Title: Re: How do I Verify that a Transaction is Mine?
Post by: DannyHamilton on April 10, 2014, 04:07:57 PM
I guess that depends on exactly what you are trying to accomplish.

Would walletnotify meet your needs?


Title: Re: How do I Verify that a Transaction is Mine?
Post by: WatchTheif on April 10, 2014, 04:46:38 PM
I would like to know how the wallet processes transactions and determines which transactions belong to me and which do not.


Yes, walletnotify fires when a tx related to me has changed and whatnot. But I would like to understand the back end a little more in the bitcoind.


Title: Re: How do I Verify that a Transaction is Mine?
Post by: piotr_n on April 10, 2014, 07:56:35 PM
I would like to know how the wallet processes transactions and determines which transactions belong to me and which do not.

Yes, walletnotify fires when a tx related to me has changed and whatnot. But I would like to understand the back end a little more in the bitcoind.
Well man, it's a complex subject.
Nobody can explain it to you in like one post.
Had you have a specific question, that would be much easier.

How the wallet processes transactions - that's the ultimate question, but there is no ultimate answer. Just a lot of studying.


Title: This message was too old and has been purged
Post by: Evil-Knievel on April 10, 2014, 08:03:10 PM
This message was too old and has been purged


Title: Re: How do I Verify that a Transaction is Mine?
Post by: WatchTheif on April 11, 2014, 01:15:14 AM
@piotr_n yes I understand what I'm asking is a bit out of the norm. I'm just wondering if there is any quick way to identify what transaction is mine and what is not using a txid. It may be the case that I end up using gettransaction and just letting it throw an error when the tx is not mine. I just want to know what is available for this specific functionality.

@Ek yes I've looked up isMine in the CPP code, I understand some of it, thanks for verifying I'm headed in the right direction, it does explain a lot.