Bitcoin Forum
November 14, 2024, 06:17:24 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind setaccount/sendfrom issues  (Read 688 times)
Elwar (OP)
Legendary
*
Offline Offline

Activity: 3598
Merit: 2386


Viva Ut Vivas


View Profile WWW
June 04, 2014, 09:40:37 AM
 #1

I have a list of public and private keys with associated public addresses I need to send bitcoins to.

To get this to work I do:
bitcoind getbalance testaccount
bitcoind importprivkey 5xyzabc.....
bitcoind setaccount 1xyzabc... testaccount
bitcoind getbalance testaccount
(if balance is higher by 'amount')
bitcoind sendfrom testaccount 1toaddress... 'amount'

When I ran this, it did not send from the right address:
bitcoind.exe getbalance test
Return: 0.00000000
bitcoind.exe importprivkey ....
bitcoind.exe setaccount  1BPMNDJqfgSx55x4fME26DtQDtBEtKiKuT test
bitcoind.exe getbalance test
Return: 1.00000000
bitcoind.exe sendfrom test 1Fbn8VVuUyejnPasPjjTdPXtQbutiyqxve 1.0

Here is the returned transaction ID:
184bd8b35e74f214e665b4cf101bc86f87aef0c81e7cdd6137a53c23cd2ad14e

You can see here that 1BPMNDJqfgSx55x4fME26DtQDtBEtKiKuT has not changed amount:
https://blockchain.info/address/1BPMNDJqfgSx55x4fME26DtQDtBEtKiKuT


Am I missing something with setaccount and sendfrom?

First seastead company actually selling sea homes: Ocean Builders https://ocean.builders  Of course we accept bitcoin.
Foxpup
Legendary
*
Offline Offline

Activity: 4534
Merit: 3188


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
June 05, 2014, 04:17:02 AM
 #2

You're missing that accounts have nothing whatsoever to do with addresses. The only thing that setaccount does is causes coins sent to a particular address to be credited to a particular account instead of the default account. Coins sent from an account merely sends whatever coins are available, and deducts the amount from the account, which is what you would normally expect. After all, when you deposit cash in a bank account, you don't expect that the notes you later withdraw will be the exact same ones that you deposited, or get upset that somebody else withdraws "your" notes. If you expect anything else, you don't understand how accounts work and shouldn't be using them (you probably shouldn't be using them anyway, but for different reasons).

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
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!