Bitcoin Forum
November 08, 2024, 11:05:22 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Armory / Re: getreceivedbyaddress confirmations? on: September 22, 2014, 03:20:08 PM
As I suspected, the getreceivedbyaddress command currently does not take confirmations into consideration.

However, it has already been implemented on the dev branch by Doug (thanks!):
https://bitcointalk.org/index.php?topic=92496.msg8926424#msg8926424
2  Bitcoin / Armory / Re: [ANN] BitcoinArmory-Daemon - armory on web servers on: September 22, 2014, 03:11:24 PM
Awesome, thanks to everyone involved!
3  Bitcoin / Armory / Re: [ANN] BitcoinArmory-Daemon - armory on web servers on: September 22, 2014, 02:34:01 PM
Hi everyone!

I made a thread over here (click me) about getreceivedbyaddress.

In short, does getreceivedbyaddress only include confirmed transactions or also unconfirmed ones?

Looking through the source gives me the impression that it counts both confirmed and unconfirmed transactions:
Code:
   def jsonrpc_getreceivedbyaddress(self, address):
      """
      DESCRIPTION:
      Get the number of coins received by a Base58 address associated with
      the currently loaded wallet.
      PARAMETERS:
      address - The Base58 address associated with the current wallet.
      RETURN:
      The balance received from the incoming address (BTC).
      """

      if CLI_OPTIONS.offline:
         raise ValueError('Cannot get received amount when offline')
      # Only gets correct amount for addresses in the wallet, otherwise 0
      addr160 = addrStr_to_hash160(address, False)[1]

      txs = self.curWlt.getAddrTxLedger(addr160)
      balance = sum([x.getValue() for x in txs if x.getValue() > 0])
      return AmountToJSON(balance)

Also looking through Transaction.py and PyBtcWallet.py did not give me any clues on how one would add an extra check to the lambda ( something like x.getConfirmations() > minconfs ) to only include confirmed transactions.

Any advice / inputs?
4  Bitcoin / Armory / getreceivedbyaddress confirmations? on: September 22, 2014, 11:15:06 AM
Hi, I'm using armoryd and I am unable to find much info about armoryd's rpc commands or api in general.

How does the getreceivedbyaddress rpc command handle confirmations? does it also include unconfirmed transactions?

Alternatively, is it safe to use getreceivedbyaddress? or am I at risk if I use it in a production environment?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!