Bitcoin Forum
December 08, 2016, 04:05:43 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Questions on JSON-RPC protocol  (Read 860 times)
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
June 20, 2011, 02:54:41 PM
 #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?

(gasteve on IRC) Does your website accept cash? https://bitpay.com
1481213143
Hero Member
*
Offline Offline

Posts: 1481213143

View Profile Personal Message (Offline)

Ignore
1481213143
Reply with quote  #2

1481213143
Report to moderator
1481213143
Hero Member
*
Offline Offline

Posts: 1481213143

View Profile Personal Message (Offline)

Ignore
1481213143
Reply with quote  #2

1481213143
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481213143
Hero Member
*
Offline Offline

Posts: 1481213143

View Profile Personal Message (Offline)

Ignore
1481213143
Reply with quote  #2

1481213143
Report to moderator
1481213143
Hero Member
*
Offline Offline

Posts: 1481213143

View Profile Personal Message (Offline)

Ignore
1481213143
Reply with quote  #2

1481213143
Report to moderator
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2506


View Profile
June 20, 2011, 09: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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
June 21, 2011, 03:24:24 AM
 #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?

(gasteve on IRC) Does your website accept cash? https://bitpay.com
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2506


View Profile
June 21, 2011, 03:28:58 AM
 #4

Is there any way to detect a double spend with the current client then?

I don't think so.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!