Author

Topic: bitcoin core sendfrom function (Read 581 times)

newbie
Activity: 20
Merit: 0
May 17, 2017, 10:46:32 AM
#8
thanks for your response.
Currently the wallet is not encrypted and its my need to use sendfrom function.
staff
Activity: 3458
Merit: 6793
Just writing some code
May 17, 2017, 10:33:16 AM
#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.
newbie
Activity: 20
Merit: 0
May 16, 2017, 11:39:28 AM
#6
Thanks for your interest  Smiley Smiley
legendary
Activity: 3472
Merit: 4801
May 16, 2017, 11:35:30 AM
#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.
newbie
Activity: 20
Merit: 0
May 16, 2017, 10:49:20 AM
#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.
legendary
Activity: 3472
Merit: 4801
May 16, 2017, 10:08:03 AM
#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?


newbie
Activity: 20
Merit: 0
May 16, 2017, 08:58:00 AM
#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.

newbie
Activity: 20
Merit: 0
May 16, 2017, 07:59:16 AM
#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
Jump to: