Author

Topic: Trying to send bitcoin to c-lightning. Getting "Invalid Bitcoin Address" (Read 220 times)

legendary
Activity: 1819
Merit: 5547
Neighborhood Shenanigans Dispenser
Change the 1 to a 0? This would show a list of addresses in your wallet with 0 confirmations as opposed to 1.

Only shows the initial wallet.dat address, and the segwit address I created and funded.

No luck for displaying anything newaddr related Sad Hrmph. I'll try a very small 100 sat transfer later on tonight and see if that doesn't get the address showing up properly.
legendary
Activity: 1819
Merit: 5547
Neighborhood Shenanigans Dispenser
If you haven't sent any funds to the address, then isn't listreceivedbyaddress working correctly?

Fair point. Ok, so it's properly communicating directly with bitcoind then.

In which case, my question then becomes, "How do I see a list of address that have been generated with newaddr and are under my control ?"
legendary
Activity: 1628
Merit: 1012
If you haven't sent any funds to the address, then isn't listreceivedbyaddress working correctly?

Fair point. Ok, so it's properly communicating directly with bitcoind then.

In which case, my question then becomes, "How do I see a list of address that have been generated with newaddr and are under my control ?"

Change the 1 to a 0? This would show a list of addresses in your wallet with 0 confirmations as opposed to 1.
legendary
Activity: 1628
Merit: 1012
Quote
First you need to transfer some funds to lightningd so that it can open a channel:

# Returns an address

cli/lightning-cli newaddr

# Returns a transaction id
bitcoin-cli sendtoaddress

-snip-
When I do bitcoin-cli listreceivedbyaddress 1 true, I'm not seeing the "newaddr" showing up in bitcoind, and can't seem to find how lightning handles its generated addresses.
-snip-

If you haven't sent any funds to the address, then isn't listreceivedbyaddress working correctly?
legendary
Activity: 1304
Merit: 1015
I figured it out.  By default c-lightning runs on testnet.  To run on mainnet you have to use:

lightningd/lightningd --network=bitcoin

The address started with a '2' because it's a testnet address.
legendary
Activity: 1304
Merit: 1015
I just tripled checked my copy and paste and I did not miss any characters.  Huh
staff
Activity: 3458
Merit: 6793
Just writing some code
You probably missed a character.
legendary
Activity: 1304
Merit: 1015
I'm following these instructions at https://github.com/ElementsProject/lightning to open a channel:

Quote
First you need to transfer some funds to lightningd so that it can open a channel:

# Returns an address

cli/lightning-cli newaddr

# Returns a transaction id
bitcoin-cli -testnet sendtoaddress



Lightning gives me a new address that starts with a "2", 2xxxxxxxxxxxxxxxxxxxxxxx.

I try to send bitcoins to this address using sendtoaddress but it says:

error code: -5
error message:
Invalid Bitcoin address


What am I doing wrong?
Jump to: