rgb-cln/bitcoin
Rusty Russell caf50c9ae4 peer: handle fulfull and fail onchain.
We now need to use bitcoin_witness_htlc with the r value, so that API
is updated to take 'struct rval' or 'struct sha256'.

We use the nc->delay amount (ie. dstate->config.min_htlc_expiry) to
wait for a timeout refund to be buried before "failing" upstream.
This should probably be made into a clearer parameter rather than
overloading this one.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


Header from folded patch 'dont-use-peer-nc-in-onchain-code.patch':

peer: Don't use peer->nc->delay for onchain case.

Use the config var directly.  We should be freeing peer->nc when the
connection dies anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
..
test utils: tal_hexstr() helper. 2016-05-03 11:28:49 +09:30
Makefile bitcoin: add first unit test. 2016-04-11 16:42:53 +09:30
README Fix typo. 2015-06-25 13:48:05 +09:30
address.h misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
base58.c bitcoin: hand in a secp256k1_context to all routines. 2016-01-22 06:41:47 +10:30
base58.h bitcoin: hand in a secp256k1_context to all routines. 2016-01-22 06:41:47 +10:30
block.c bitcoind: use correct endianness for block hashes. 2016-04-24 19:41:20 +09:30
block.h bitcoind: use correct endianness for block hashes. 2016-04-24 19:41:20 +09:30
locktime.c daemon: fix BIP68 support. 2016-04-11 16:34:29 +09:30
locktime.h header cleanup: sort include lines into alpha order, after config.h 2016-01-22 06:38:08 +10:30
privkey.h header cleanup: sort include lines into alpha order, after config.h 2016-01-22 06:38:08 +10:30
pubkey.c protocol: remove support for uncompressed pubkeys. 2016-03-30 16:54:16 +10:30
pubkey.h protocol: remove support for uncompressed pubkeys. 2016-03-30 16:54:16 +10:30
script.c peer: handle fulfull and fail onchain. 2016-07-01 12:00:17 +09:30
script.h peer: handle fulfull and fail onchain. 2016-07-01 12:00:17 +09:30
shadouble.c bitcoin: use ccan/mem instead of rolling own check_mem function. 2015-10-26 21:06:23 +10:30
shadouble.h header cleanup: sort include lines into alpha order, after config.h 2016-01-22 06:38:08 +10:30
signature.c misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
signature.h misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
tx.c Remove unused script functions now we use witness. 2016-04-24 20:09:39 +09:30
tx.h Remove unused script functions now we use witness. 2016-04-24 20:09:39 +09:30
varint.c varint: new file. 2016-04-12 13:07:03 +09:30
varint.h varint: new file. 2016-04-12 13:07:03 +09:30

README

These are standard bitcoin manipulation routines which should be
provided by any normal bitcoin library in whatever language you choose.

The ones here are standalone ones taken from bitcoin core and some I
wrote, many taken from bitcoin-iterate and pasted in here.