Author

Topic: Bitcoin core RPC method sendfrom is not working (Read 453 times)

legendary
Activity: 3472
Merit: 4801
Quote
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
Your parameters are in the wrong order. The command format is
Code:
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount )
newbie
Activity: 20
Merit: 0
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.
Jump to: