Commit Graph

8 Commits

Author SHA1 Message Date
Rusty Russell 0dbbd81430 bitcoind: tell bitcoind_poll_transactions's callback if tx is a coinbase.
In this case, the inputs aren't valid transactions, so don't try to
find them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell 5b9f8d8bbd bitcoind: serialize requests.
bitcoind has a limit of 16 requests at once, by default, so our simplest
solution is to serialize them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell 980d0d2bf1 bitcoind: warn if their bitcoin config not on testnet/regtest.
Otherwise you get weird errors as bitcoind refuses our testnet addresses.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell 34e32978b8 bitcoind: warn if their bitcoin config doesn't have walletbroadcast=0.
Because we use the bitcoin wallet to create the anchor transaction, we
need to make sure it doesn't broadcast it; safest to check their config
for the option.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell c51a8d804f bitcoind: routine to send to a specific address.
We use this to create our anchor payment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell d5328c7577 bitcoind: routine to broadcast a transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell fc49e3fd74 daemon: rename 'state' to 'dstate' everywhere.
This is the daemon state, not the state machine state.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30
Rusty Russell 5ec8ff91e4 daemon/bitcoind: communication with bitcoind.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:49 +10:30