Bitcoin Forum
May 07, 2024, 07:15:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin core sendfrom function  (Read 564 times)
xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 16, 2017, 12:59:16 PM
 #1

I am new to Bitcoin.I am running Bitcoin core RPC method sendfrom which is used to send bitcoins from one account to other bitcoin account but it returns me nil instead of tx. Undecided Undecided
1715066124
Hero Member
*
Offline Offline

Posts: 1715066124

View Profile Personal Message (Offline)

Ignore
1715066124
Reply with quote  #2

1715066124
Report to moderator
1715066124
Hero Member
*
Offline Offline

Posts: 1715066124

View Profile Personal Message (Offline)

Ignore
1715066124
Reply with quote  #2

1715066124
Report to moderator
1715066124
Hero Member
*
Offline Offline

Posts: 1715066124

View Profile Personal Message (Offline)

Ignore
1715066124
Reply with quote  #2

1715066124
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 16, 2017, 01:58:00 PM
 #2

Really thanks for your reply.
I am doing the same which you said.I am running the following command from my controller

      response = %x{/usr/local/bin/b/bitcoin-cli "sendfrom", "#{params[:account_name].strip}", "#{params[:to_address].strip}", "#{params[:amount]}")}

and the account has 0.14 BTC and i am trying to send 0.001 BTC.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4623



View Profile
May 16, 2017, 03:08:03 PM
 #3

First, we need to make sure that you understand that an "account" and a "bitcoin address" are NOT THE SAME THING.

Once we are sure that you understand that, then you need to understand that Bitcoin Core will allow an account to have a negative balance, so it doesn't matter how many BTC the account has.  What is important is that the wallet has enough bitcoins to cover both the amount you want to send.  If the account you are trying to send from has a balance of 0.14 BTC, and a different account has a balance of -0.13999 BTC, then your wallet might not have enough bitcoins to send 0.001 BTC.

Have you tried "listaccounts" to make sure that you haven't misspelled the account name?

Have you tried "getbalance" to make sure that the wallet has a high enough balance?


xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 16, 2017, 03:49:20 PM
 #4

Thanks for your reply.
I know about the difference between "account" and "bitcoin address".Also account name spellings are correct and  "getbalance" gives 0.23 BTC.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4623



View Profile
May 16, 2017, 04:35:30 PM
 #5

Thanks for your reply.
I know about the difference between "account" and "bitcoin address".Also account name spellings are correct and  "getbalance" gives 0.23 BTC.

Then I don't know why it isn't working for you.  Sorry I can't be more helpful. You'll have to wait for someone more knowledgeable to respond to your post.
xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 16, 2017, 04:39:28 PM
 #6

Thanks for your interest  Smiley Smiley
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6595


Just writing some code


View Profile WWW
May 17, 2017, 03:33:16 PM
 #7

Is the wallet encrypted? If it is, are you using the walletpassphrase command first to decrypt it?

Also, sendfrom is deprecated. You should use sendtoaddress instead.

xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 17, 2017, 03:46:32 PM
 #8

thanks for your response.
Currently the wallet is not encrypted and its my need to use sendfrom function.
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!