mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-08 08:34:31 +01:00
lightningd/commit_tx: support for printing out actual tx fees.
This was included in the lightningnetwork/lightning-rfc#105 update to the test vectors, and it's a good idea. Takes a bit of work to calculate (particularly, being aware of rounding issues). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
static bool print_superverbose;
|
||||
#define SUPERVERBOSE(...) \
|
||||
do { if (print_superverbose) printf(__VA_ARGS__); } while(0)
|
||||
#define PRINT_ACTUAL_FEE
|
||||
#include "../commit_tx.c"
|
||||
#include "../htlc_tx.c"
|
||||
#include <bitcoin/preimage.h>
|
||||
@@ -15,6 +16,9 @@ static bool print_superverbose;
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <type_to_string.h>
|
||||
|
||||
/* Turn this on to brute-force fee values */
|
||||
/*#define DEBUG */
|
||||
|
||||
static struct sha256 sha256_from_hex(const char *hex)
|
||||
{
|
||||
struct sha256 sha256;
|
||||
|
||||
Reference in New Issue
Block a user