Bitcoin Forum
May 13, 2024, 12:51:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about move() command  (Read 845 times)
Bitsky (OP)
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
September 15, 2011, 10:05:05 AM
 #1

The API documentation states that one can move Bitcoins from one account to another one in your wallet with move() by specifying from, to and the amount.

Since addresses are assigned to accounts with setaccount(), I don't think that move() is just moving addresses, but actually doing a transaction (hence the amount option).

Now if I want to use move() to reorganize / shuffle around the Bitcoins in my wallet, will I
a) have to pay a transaction fee every time I move an amount and
b) generate an entry in the blockchain?

Also, the amount is rounded to the nearest 0.01. Will it be possible to move smaller amounts in the future?

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
1715604688
Hero Member
*
Offline Offline

Posts: 1715604688

View Profile Personal Message (Offline)

Ignore
1715604688
Reply with quote  #2

1715604688
Report to moderator
1715604688
Hero Member
*
Offline Offline

Posts: 1715604688

View Profile Personal Message (Offline)

Ignore
1715604688
Reply with quote  #2

1715604688
Report to moderator
1715604688
Hero Member
*
Offline Offline

Posts: 1715604688

View Profile Personal Message (Offline)

Ignore
1715604688
Reply with quote  #2

1715604688
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.
1715604688
Hero Member
*
Offline Offline

Posts: 1715604688

View Profile Personal Message (Offline)

Ignore
1715604688
Reply with quote  #2

1715604688
Report to moderator
1715604688
Hero Member
*
Offline Offline

Posts: 1715604688

View Profile Personal Message (Offline)

Ignore
1715604688
Reply with quote  #2

1715604688
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
September 15, 2011, 10:26:47 AM
 #2

Accounts have very little to do with addresses, they're just virtual balances. Move does not perform a transaction, it only increases the balance of one account and decreases another.

I do Bitcoin stuff.
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
September 15, 2011, 11:09:24 AM
 #3

Addresses are assigned to accounts only to determine which account's balance to increase if new coins arrive. Any coins you hold belong to your wallet. Account balances are purely for user convenience.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
Bitsky (OP)
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
September 15, 2011, 11:23:38 AM
 #4

Figured that accounts are only used for some sort of summaries.

Let's say I have two accounts in my wallet:
- acc1 with addr1 holding 5btc
- acc2 with addr2 holding 10btc

When I do a move(acc2, acc1, 1), then 1btc should wander from acc2 into acc1.

But how is this handled address-wise? The moved bitcoin needs to be removed from addr2 and added either to addr1 or to a new address which gets assigned to acc1.

So either:
- acc1 with addr1 holding 6btc
- acc2 with addr2 holding 9btc

or
- acc1 with addr1 holding 5btc and addr3 holding 1btc
- acc2 with addr2 holding 9btc

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
September 15, 2011, 11:44:52 AM
 #5

Again, coins are not moved between addresses. There is only one pool of coins the client chooses from, and it represents the entire wallet.

Accounts are only summaries, and have no connection to the actual addresses the available coins were last sent to (in fact, coins do not necessarily have an address they were last sent to).

I do Bitcoin stuff.
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
September 16, 2011, 12:08:21 AM
 #6

Figured that accounts are only used for some sort of summaries.

Let's say I have two accounts in my wallet:
- acc1 with addr1 holding 5btc
- acc2 with addr2 holding 10btc

When I do a move(acc2, acc1, 1), then 1btc should wander from acc2 into acc1.
Right, which just requires changing the "5" to a "6" and the "10" to a "9".

Quote
But how is this handled address-wise? The moved bitcoin needs to be removed from addr2 and added either to addr1 or to a new address which gets assigned to acc1.
No, it doesn't. You've moved it from one account to another, not from one address to another.

Quote
So either:
- acc1 with addr1 holding 6btc
- acc2 with addr2 holding 9btc

or
- acc1 with addr1 holding 5btc and addr3 holding 1btc
- acc2 with addr2 holding 9btc
The fact that addr1 is associated with acc1 means *ONLY* that newly-received coins sent to addr1 are credited to acc1. If a new address needed to be created, there would be no reason to associate it with acc1 specifically and in fact it would be associated with the default account.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
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!