Bitcoin Forum
June 23, 2024, 11:14:01 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin core RPC method sendfrom is not working  (Read 417 times)
xishon (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 17, 2017, 11:27:29 AM
Last edit: May 17, 2017, 03:23:58 PM by xishon
 #1

Bitcoin core RPC method sendfrom is not working from my controller.I am running the following command from my controller

   bitcoin_cli = BitcoinCli.new
    response = bitcoin_cli.execute_function("sendfrom", "#{account.strip}", "#{address.strip}", "#{amount}")

and here is execute function

class BitcoinCli
  def initialize()
    # nothing to do
  end

 begin
    def execute_function(function_name, *params)
      result = %x{/usr/local/bin/bitcoin-cli #{function_name} #{params.join(' ')}}
    end
  rescue => e
    puts e.message
  end
end

but after executing the function the response is nil.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
May 17, 2017, 01:35:06 PM
 #2

Your parameters are in the wrong order. The command format is
Code:
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount )

DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4672



View Profile
May 17, 2017, 02:43:07 PM
 #3

Thanks for your response.
Sorry to say but I am currently using sendfrom function.

Sorry to say, but your thread is asking about sendtoaddress 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!