core-lightning/bitcoin
Jon Griffiths aa23c2a2b2 script: consistently take the script length in identification functions
Standardizes the is_xxx script function all take a script length, and changes
their first-level callers to pass it. This has several knock on benefits:

- We remove the repeated tal_count/tal_bytelen calls on the script, in
  particular the redundant calls that result when we must check for multiple
  types of script - which is almost all cases.
- We remove the dependency on the memory being tal-allocated (It is, in
  all cases, but theres no reason we need to require that).
- We remove all cases where we create a copy of the script just to id it.
- We remove all allocations for non-interesting scripts while iterating block
  txs in process_getfilteredblock_step1().
- We remove all allocations *including for potentially interesting scripts* in
  topo_add_utxos().

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
2024-03-18 12:24:49 +10:30
..
test common: add amount_feerate helper. 2023-11-01 14:11:28 +10:30
address.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
base58.c base58: use _n api variant to avoid duplicating our input string 2024-01-16 15:47:03 +01:00
base58.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
block.c bitcoin_block_from_hex: avoid creating PSBT wrappers for finalized block txs 2024-01-16 15:47:03 +01:00
block.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
chainparams.c chainparams/dual-open: set max_supply; use for max on wumbo channels 2022-10-20 13:42:41 +02:00
chainparams.h Fix incorrect hex value for Signet port 2024-02-16 15:54:29 +01:00
feerate.c lightningd: clarify uses of dynamic (mempool) feerate floor, and static. 2023-04-10 07:31:12 +09:30
feerate.h lightningd: clarify uses of dynamic (mempool) feerate floor, and static. 2023-04-10 07:31:12 +09:30
locktime.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
locktime.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
Makefile bitcoin: add to check-source-bolt, and (minor) quotes fixup. 2022-06-18 13:45:09 +09:30
preimage.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
preimage.h wire: move towire/fromwire_preimage out to bitcoin/preimage.c. 2020-05-18 14:51:12 +02:00
privkey.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
privkey.h wire: move remaining bitcoin functions out to bitcoin/ files. 2020-05-18 14:51:12 +02:00
psbt.c psbt: use wally_map_get instead of wally_map_find 2024-01-16 15:47:03 +01:00
psbt.h splice: Reestablish when commit or sig sends fail 2023-11-20 07:35:22 +01:00
pubkey.c Remove point32. 2022-10-26 11:29:06 +10:30
pubkey.h Remove point32. 2022-10-26 11:29:06 +10:30
README Fix typo. 2015-06-25 13:48:05 +09:30
script.c script: consistently take the script length in identification functions 2024-03-18 12:24:49 +10:30
script.h script: consistently take the script length in identification functions 2024-03-18 12:24:49 +10:30
shadouble.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
shadouble.h wire: move remaining bitcoin functions out to bitcoin/ files. 2020-05-18 14:51:12 +02:00
short_channel_id.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
short_channel_id.h lightningd: Add RPC for populating DB with stub channels and set an error on reconnecting 2022-07-14 12:24:48 -05:00
signature.c bitcoin: remove DEVELOPER options. 2023-09-21 20:08:24 +09:30
signature.h bitcoin: remove DEVELOPER options. 2023-09-21 20:08:24 +09:30
tx.c Revert "core: Add a function check if a script is P2WSH without allocating" 2024-03-18 12:24:49 +10:30
tx.h Revert "core: Add a function check if a script is P2WSH without allocating" 2024-03-18 12:24:49 +10:30
tx_parts.c tx_parts: use wally to clone tx inputs 2024-02-21 12:01:33 +01:00
tx_parts.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
varint.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
varint.h varint: Add helper function for getting varlen size 2019-10-10 05:57:45 +00:00

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.