Bitcoin Forum
May 11, 2024, 04:52:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind setaccount/sendfrom issues  (Read 678 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.
1715446322
Hero Member
*
Offline Offline

Posts: 1715446322

View Profile Personal Message (Offline)

Ignore
1715446322
Reply with quote  #2

1715446322
Report to moderator
1715446322
Hero Member
*
Offline Offline

Posts: 1715446322

View Profile Personal Message (Offline)

Ignore
1715446322
Reply with quote  #2

1715446322
Report to moderator
1715446322
Hero Member
*
Offline Offline

Posts: 1715446322

View Profile Personal Message (Offline)

Ignore
1715446322
Reply with quote  #2

1715446322
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715446322
Hero Member
*
Offline Offline

Posts: 1715446322

View Profile Personal Message (Offline)

Ignore
1715446322
Reply with quote  #2

1715446322
Report to moderator
Foxpup
Legendary
*
Offline Offline

Activity: 4354
Merit: 3044


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!