-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Description
When I use send_money() method and pass all of required params (from_address as string, to_address as string, satoshi_amount as integer, private_key as string), then get an error:
objc[62090]: +[NSString initialize] may have been in progress in another thread when fork() was called.
objc[62090]: +[NSString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
It looks like the reason for the error is in the nested method signer(). The same error when I call it through the console
def signer(private_key, tosign)
key = Bitcoin::Key.new(private_key, nil, compressed = true)
signatures = []
tosign.each do |to_sign_hex|
to_sign_binary = [to_sign_hex].pack('H*')
sig_binary = key.sign(to_sign_binary)
sig_hex = sig_binary.unpack1('H*')
signatures << sig_hex
end
signatures
end
