Commit Graph

8 Commits

Author SHA1 Message Date
Rusty Russell 27eedc9f51 patch bitcoind_get_mediantime.patch 2016-01-22 06:45:28 +10:30
Rusty Russell 6afe3f718d daemon: bitcoind callback gives the blockhash the tx was included in.
This is required for transactions which use OP_CSV to lock outputs for
a given amount of time: we need to know the mediantime of the block
they were included into.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
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 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