Author

Topic: Questions on JSON-RPC protocol (Read 1070 times)

administrator
Activity: 5222
Merit: 13032
June 20, 2011, 11:28:58 PM
#4
Is there any way to detect a double spend with the current client then?

I don't think so.
hero member
Activity: 868
Merit: 1007
June 20, 2011, 11:24:24 PM
#3
2. If a transaction is received, but later determined to be invalid (ie. a double spend), will bitcoin still report those transactions in listtransactions but give an indication that it's invalid (I would think that is desirable since it would be important to detect an invalid transaction)?

It will just stay 0/unconfirmed forever.

Is there any way to detect a double spend with the current client then?
administrator
Activity: 5222
Merit: 13032
June 20, 2011, 05:18:04 PM
#2
1. When you get the details of a transaction (gettransaction), is the timestamp that bitcoin reports the timestamp of the transaction itself, or the time when bitcoin received the transaction?

It's the timestamp of the block the transaction is in if it is in a block, or the time you received it if it has 0 confirmations. Transactions don't have timestamps themselves.

Quote
2. If a transaction is received, but later determined to be invalid (ie. a double spend), will bitcoin still report those transactions in listtransactions but give an indication that it's invalid (I would think that is desirable since it would be important to detect an invalid transaction)?

It will just stay 0/unconfirmed forever.
hero member
Activity: 868
Merit: 1007
June 20, 2011, 10:54:41 AM
#1
I have a couple questions on the protocol:

1. When you get the details of a transaction (gettransaction), is the timestamp that bitcoin reports the timestamp of the transaction itself, or the time when bitcoin received the transaction?

2. If a transaction is received, but later determined to be invalid (ie. a double spend), will bitcoin still report those transactions in listtransactions but give an indication that it's invalid (I would think that is desirable since it would be important to detect an invalid transaction)?

Also, is there a full spec somewhere of the info returned from gettransaction?
Jump to: